327
votes
Accepted
Maintain hundreds of customized branches over master branch
You are completely abusing branches! You should have the customisation powered by flexibility in your application, not flexibility in your version control (which, as you have discovered, is not ...
269
votes
Accepted
Why does everyone use Git in a centralized manner?
Ahh, but in fact you are using git in a decentralized manner!
Let us compare git's predecessor in mindshare, svn. Subversion had only one "repo", one source of truth. When you did a commit, it was to ...
245
votes
Accepted
My office wants infinite branch merges as policy; what other options do we have?
Even though I use Git on the command line – I have to agree with your colleagues. It is not sensible to squash large changes into a single commit. You are losing history that way, not just making it ...
198
votes
Accepted
What are the advantages of using branching as a solo developer?
The advantages are mostly the same as for groups of developers. By using an always release-ready master branch, and feature branches for developing new features, you can always release off the master. ...
131
votes
Whose responsibility is it to fix merge conflicts?
Person A is the one who decides when to incorporate new changes from master, so Person A will perform the merge. Person A should certainly attempt to resolve merge conflicts on their own, but if any ...
111
votes
My office wants infinite branch merges as policy; what other options do we have?
I like Amon's answer, but I felt one small part needed a lot more emphasis: You can easily simplify history while viewing logs to meet your needs, but others cannot add history while viewing logs to ...
110
votes
Accepted
Is it bad practice to not delete redundant files right away from VCS but instead mark them as "To be deleted" with comments first?
The problem with adding a comment to a file that it should be deleted, instead of deleting it in source control and putting the explanation there, is the assumption that if developers do not read ...
107
votes
Accepted
How can a developer overcome their fear of merge conflicts?
Oh god yes.
I broke the build my first time. Made me so gun shy I was hiding versions in folders. Of course delaying my check-ins just made things worse. I was in hell until I figured out what I ...
105
votes
Is it bad practice to not delete redundant files right away from VCS but instead mark them as "To be deleted" with comments first?
Yes it is bad practice.
You should put the explanation for the deletion in the commit message when you commit the deletion of the files.
Comments in source files should explain the code as it ...
98
votes
Do seasoned developers still have to deal with merge conflicts?
I think it's a little disingenuous to say that good developers never have merge conflicts, but they can surely reduce the number of times it happens. It's also very important to remember that ...
95
votes
Maintain hundreds of customized branches over master branch
Having 500 clients is a nice problem, if you had spent the time up front to avoid this problem with branches, you may never have been able to remain trading for long enough to get any clients.
...
85
votes
Accepted
Is it better to merge "often" or only after completion do a big merge of feature branches?
The longer a branch lives, the more it is able to diverge from the main branch and the messier and more complicated the resulting merge will be when it's finally finished. Ten small conflicts are ...
83
votes
Should images be stored in a git repository?
This question is pretty old but this is a common question that comes up when dealing with Git and there has some progress on modern solutions to storing large files in a Git repo since the last answer....
71
votes
Should I record a bug that I discovered and patched?
It depends on who the audience of a bug report is.
If it is only looked at internally by developers, to know what needs to be fixed, then don't bother. It's just noise at that point.
Non-exhaustive ...
61
votes
Accepted
Git - What issues arise from working directly on master?
There are several problems when commits are directly pushed to master
If you push a work-in-progress state to remote, the master is potentially broken
If another developer starts work for a new ...
59
votes
Should we include the NuGet PACKAGE folder in version control?
It depends.
Check out Bart van Ingen Schenau's answer to determine if it's possible to ignore the packages folder at all.
Basically: yes, NuGet is designed so that you can ignore the packages folder ...
53
votes
Should I record a bug that I discovered and patched?
I'd say, it depends whether your product was released with the bug or not.
If it's released with the bug that you found, then yes, create a bug-report. Release cycles can often be long and you don't ...
49
votes
How do you manage your own comments on a foreign codebase?
Simply get into the habit of writing good comments - short, neutral, objective and non-redundant information about why a bit of code is doing what it's doing - and then the authors will probably be ...
43
votes
What are the advantages of using branching as a solo developer?
Long running development
Branching for a single person team would be useful for a long-running development feature that otherwise does not fit into your release cycle.
You can take a branch for your ...
42
votes
Accepted
Should we include the NuGet PACKAGE folder in version control?
A lot of time has passed, and NuGet has changed, so here's a new answer.
NuGet no longer creates a packages folder inside your source structure. Instead there is one in your user directory (%...
42
votes
Why does everyone use Git in a centralized manner?
I don't know how you define "everyone", but my team has "a central repo on a server" and also from time to time we pull from other colleagues' repos without going via that central repo. When we do ...
40
votes
Maintain hundreds of customized branches over master branch
In the future, ask the Joel test questions in your interview. You'd be more likely not to walk into a trainwreck.
This is an, ah, how shall we say... really, really bad problem to have. The "interest ...
35
votes
Accepted
How to structure commits when unit test requires refactoring
When working on existing code, it's common that you need to refactor the code before you can implement your feature.
This is the mantra from Kent Beck: "Make the change easy (warning: this may be ...
34
votes
My office wants infinite branch merges as policy; what other options do we have?
Our issue is with long-term sidebranches -- the kind where you've got
a few people working a sidebranch that splits from master, we develop
for a few months, and when we reach a milestone we sync ...
33
votes
What's the best structure for a repository?
Based on my experience with open source, you should consider a few things before setting up a structure:
Things to consider
Language and Technology: Frameworks and languages dictate a lot of what your ...
32
votes
Should we include the NuGet PACKAGE folder in version control?
The basic rule for what goes into a source control repository is that you store there everything related to a project that you need to be able to build, test, deploy and execute the project and which ...
30
votes
Accepted
Git branching strategy for long-running unreleased code
Simple suggestion: don't do that.
git branches are not for long-running forks of the code, as discussed here and here. Branches are best treated as transient things used to organize commits by an ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
version-control × 962git × 311
svn × 96
branching × 89
mercurial × 51
project-management × 50
versioning × 45
team-foundation-server × 44
github × 39
continuous-integration × 36
development-process × 34
programming-practices × 31
workflows × 31
release-management × 28
open-source × 27
dvcs × 26
merging × 26
teamwork × 22
deployment × 19
database × 18
source-code × 18
repository × 18
web-development × 17
testing × 17
builds × 17