Questions tagged [version-control]
A programming discipline for tracking, storing and retrieving revisions of source code.
978 questions
4
votes
5
answers
643
views
What is the current definition of a Mono-Repo
Facebook famously made a post about using a "monorepo" and for a while it seemed like this approach would take over from standard, separate out the code into multiple source controlled "...
2
votes
3
answers
170
views
Should a web framework / template like Admin-LTE be put in source control alongside our own code?
My team does predominantly back-end work in C#, with a smattering of front-end web development using Angular. We're starting a new website project, based on the Admin LTE framework / template. This is ...
4
votes
1
answer
211
views
Maintaining software for different versions of Ubuntu
I have some software intended to work on both Ubuntu 22 and Ubuntu 24, but due to differences between the distributions, it doesn't function properly on Ubuntu 24. Given this context, what is the ...
1
vote
6
answers
386
views
How to manage common library dependencies to prevent cross-application breakage?
Note: The question was heavily rewritten after the comments it received.
I work on a team that develops embedded software for various in-house devices. Each device hosts multiple "bare metal"...
19
votes
7
answers
5k
views
Debugging a performance issue, do I commit the timing code?
I am working in small company, having a lead position in a group of 5. We are developing a C++ application. One requirement is that it needs to run fast.
Today, I noticed one function, say f1(), and ...
14
votes
8
answers
5k
views
When is it acceptable to commit directly to main/master?
Working with Git, I’ve often heard that committing directly to the main (or master) branch is generally discouraged. Instead, many teams adopt workflows where all changes are made in separate branches,...
2
votes
3
answers
118
views
Planning Dynamic Patient Charts with Version Control and Historical Accuracy - Temporal Versioning or JSON
I'm working on a project for our healthcare clinic's software and could use some guidance. For regulatory and historical purposes, patient charts need to remain as "static" records—...
2
votes
2
answers
1k
views
What are the pros and cons of using cherry-pick versus merge for release management? [closed]
What are the pros and cons of using cherry-pick versus merge for release management?
Background
We have a dev branch, and just created a release1 branch from it. Folks will commit relevant content to ...
18
votes
7
answers
5k
views
Is there anything wrong in reordering commits?
So, in many software you can do that easily using the mouse:
Although very useful, they aren't in chronological order anymore.
Is there anything wrong in doing that?
0
votes
2
answers
4k
views
Why does Meta (Facebook) use mono-repo in their source control? [closed]
Meta maintains all their code in a single repository and initially used Git. Due to performance issues attributed to the repo's size, they consulted Git's team, who suggested switching to a multi-repo ...
0
votes
2
answers
239
views
Source Control Design for Proprietary Logic which includes Obfuscation
Problem:
There are proprietary algorithms that developers who are actively working on a project will need to call but they should not see the underlying logic. They need to be stored in an area of ...
9
votes
3
answers
7k
views
How should source code unit tests affect semantic versioning?
I recently started using Semantic Versioning.
Due to conflicts with my previous versioning convention (which I created myself), I am very confused about versioning unit tests as part of the public API....
11
votes
11
answers
8k
views
Where to keep the code that I do not want in the main?
I made some changes that, after testing, I decided not to use for now.
Thus I don't want them in the main branch.
However, I don't want to discard them altogether (maybe I will need them later?)
What ...
2
votes
2
answers
830
views
Where to tag releases to achieve "build-once, deploy-everywhere" using GitFlow?
TL;DR: Using GitFlow, which commit do you tag to identify the build of your next release? If you tag the merge commit on main, you'll need to rebuild and deploy something you didn't test on QA (and ...
1
vote
1
answer
866
views
Git Branching and Merging Strategy for Feature-Oriented Release Process
We have multiple developers contributing to a project, using Git as our repository. We have a QA branch that matches our QA environment and a master branch that matches production.
Features can be in ...
0
votes
2
answers
236
views
Is a 'base' file always necessary when doing a merge?
Are there any algorithms that can do or suggest merges without requiring the "base" file, the most recent common ancestor of the two file versions that we want to merge?
Is a manual merge ...
1
vote
0
answers
90
views
Is there a name for this partially ordered versioning scheme?
Versions are on the form:
x.y.z.[..]
Where these letters are numbers and there are arbitrarily many of them.
The first version is 1. The next one is 2. The only time when you
branch out to the next ...
17
votes
6
answers
7k
views
How do you manage your own comments on a foreign codebase?
A common scenario I have is this:
I download a new codebase. In order to have me understand the code, I need to litter it with my own comments about what each section of code does.
It seems ...
1
vote
0
answers
172
views
Design patterns for versioning steps across data/workflow pipelines?
I'm sure this has been touched upon by a number of questions, but I'm struggling on drawing the boundaries between code, data and configuration versions when working with a large DAG (think airflow or ...
0
votes
2
answers
240
views
If "others have modified components since you checked out the system", what would you do?
In Software Engineering by Pressman:
The steps in continuous integration are:
Check out the mainline system from the version management system into the developer's private workspace.
Build the ...
1
vote
2
answers
168
views
What is the most efficient approach about dependencies versions?
Recently I had many problems opening old projects, which had all dependencies in package.json defined with ^ x.y.z. When I pull the code and run npm install the dependencies are installed but I will ...
1
vote
1
answer
178
views
Strategy for deploying code internally and externally with common code base, but different functionality
For one of my current projects, written in Python, we would like to have two different versions: One for internal use, with all features enabled, and one for external use, with limited features. The ...
4
votes
1
answer
368
views
How to label backwards incompatible changes which change the API but don't add a feature?
I have a project in which I'm the sole contributor, there isn't a stable API yet and I'm constantly refactoring code, but I still try to denote breaking changes whenever they do happen. Recently ...
1
vote
1
answer
2k
views
Should tags be introduced on commits still in Pull Request branches outside of main/master branch?
Context: I am working on a project in which people use tags on commits yet in branches waiting on the Pull Requests queue of GitHub. This means they are non-merged to the main branch yet.
The problem ...
2
votes
0
answers
872
views
Is the difference between "changesets" and "snapshots" in version control primarily a space-time tradeoff?
There are many version control systems out there, and they tend to use one of the following models to store separate versions of a repository:
Snapshots - each version of your repository is stored in ...
3
votes
1
answer
414
views
I need help understanding a seemingly broken Git release flow
First some context. Working in teams which use a CI environment, many people will know the typical Gitflow release process.
Without going into too much political detail, the company I currently work ...
3
votes
2
answers
346
views
Is it logically possible to consistently name commits in a VCS using an ordered sequence?
Imagine you're creating a completely new version control system, like Git, Mercurial, SVN etc. from scratch. Rather than identifying commits by SHA hashes, you identify them using an ordered sequence ...
0
votes
2
answers
279
views
Version control for modification of a part of another project used in my project
There is somebody else's project (A), a part of which (foo.h) I want to use in my project (B) with some modifications. The modifications make sense only in the context of B, so I can copy foo.h into B ...
4
votes
2
answers
685
views
How to keep attribution in version control (git) when one author moves another author's code?
Sometimes code will need to be moved. A common example is some logic that exists in a controller needs to get moved to a helper class so it can be called from outside of that controller. So someone ...
2
votes
0
answers
886
views
Better alternative for cherry picking across heavily diverged branches
I'm currently trying to update the linux kernel used in a xilinx SoC, my company has an internal repo/fork of xilinx open source linux with a bunch of kernel drivers for our custom hardware & ...
0
votes
3
answers
192
views
Merging Python2.7 code to its ported Python3.9 version
I am working on a Django based project that is version controlled with SVN. My main objective is porting it from Python2.7 to Python3.9. Whilst I port the project, my team brought some updates, now I ...
-3
votes
1
answer
164
views
Applying a file diff to a new file [closed]
Suppose I have file a.txt, b.txt and c.txt:
a.txt:
Hello, I like cake.
b.txt:
Hello, I like turtles.
c.txt:
go away, I don't like you
I suspect the difference between a.txt and b.txt is ...
-2
votes
4
answers
370
views
How can I use git effectively when I'm just starting a project and working on many parts at once?
I've been having the problem that at the beginning of a new project, I'm likely to switch frequently between tasks in a way that (to me) doesn't seem very conducive to small single-concern commits. ...
6
votes
3
answers
2k
views
Mixing server and client code in monorepo
To date, we have implemented a multi-repo approach in which each project, or for larger projects, each tier, has its own repo. Code is written in Typescript, Javascript, C#, PowerShell and T-SQL. ...
0
votes
2
answers
333
views
How to version modules that depend on different framework versions
I work as a Website developer. We use a framework for building the backend of our sites.
This framework recently released a new major version with lots of breaking changes. We have some sites using ...
6
votes
5
answers
2k
views
With Kent Beck's "test && commit || revert" (TCR), do you skip the "red" of "red, green, refactor"?
If you haven't heard of Kent Beck's TCR, it can be summarized with this: any time your tests go green, you commit; anytime your tests go red, you git reset --hard.
This post is about how to practice ...
0
votes
2
answers
203
views
What is the current definition of continuous integration?
It seems that there are at least two possible definitions of continuous integration:
Frequent merging of a codebase to a common codebase (e.g. daily merge to the main branch of a VCS server).
...
-1
votes
2
answers
356
views
Proper ways to manage evolving inter-communicated microservices APIs?
I'm working on a big C# application that is currently under development so we have some room for structural refactoring.
The application is divided into 10 microservices, which some of them ...
7
votes
1
answer
364
views
How do you use version control systems while you are in a long design spike phase?
In some recent projects, I found myself having some longer spike phases in which I build many cheap prototypes and explore different design decisions, long before I would consider my code of ...
6
votes
6
answers
1k
views
Is there any way of applying a code formatter to a active codebase that doesn't lead to suffering?
Often one wants to apply a code-formatter, like Black, or JuliaFormatter to a existing code-base.
One where standards have tried to be followed but a few things might have slipped in.
Once you have ...
5
votes
3
answers
493
views
Reasons behind conventions around what goes into source control?
I've come across some apparently-conflicting patterns of behaviour. I'd like to understand why they each exist. I'll call them "conventions" for the sake of simplicity, though I'm not sure ...
3
votes
3
answers
691
views
Is checking dependencies into source control worth the cost?
For the last several years, I've been checking all dependencies of my team's nodejs project into source control. At first, we stored the archives of all dependencies using yarn v1's offline mirror, ...
3
votes
1
answer
2k
views
Strategies to organize multiple projects which may reference each other and managed by different teams in Git?
First actually I don't think Git is a specific involved tool here, it can be any other Source/Version Control tool (TFS, SVN, ...). The point here is how to deal with the scenario in which I have ...
0
votes
0
answers
155
views
How much should we archive for reproducible builds?
A few alternative twists on the question title to contextualize further:
What to archive of the "sources" for a given software build?
Should I include all transitive packages in my ...
0
votes
2
answers
1k
views
Architecting project into multiple source control repositories
I'm doing some work with my team to refactor/rearchitect some parts of our existing codebase which consists of two separate Django apps hosted in one common project repository. We're starting work on ...
-1
votes
1
answer
109
views
Version control organization for large .NET solutions
I'm trying to come up with a better way to organize my C# projects on SVN. The .NET solution for my main GUI has about 28 class library projects. These libraries fall into two categories. Some of them ...
2
votes
4
answers
834
views
How can I keep track of which existing lines of code/text have passed some new review?
Firstly, this is a really tough topic to do searches for because you get a wealth of information on “code review”, which is different from what I’m referring to here. That normally refers to ...
2
votes
0
answers
361
views
Build & deploy individual apps from a monorepo
My Proposed Monorepo Architecture
This layout is what I've come up with from reading through tons of articles and being convinced that Nx suits many of our needs where I work. The layout works fine ...
10
votes
2
answers
3k
views
Should Visual Studio specific files be excluded from version control?
I work on a number of code projects, some open source and some not. Many of these projects are intended to be cross-platform, most often running on either Linux (my natural habitat) or Windows and ...
3
votes
1
answer
2k
views
How to setup our codebase for efficient code sharing and development?
Our situation
At first, our company had 1 product. Custom hardware with firmware we wrote ourselves.
Now more projects are starting to be added. Many can reuse most of the components of our first ...