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 ...
Lightness Races in Orbit's user avatar
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 ...
Michael Hampton's user avatar
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 ...
amon's user avatar
  • 134k
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. ...
Sebastian Redl's user avatar
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 ...
Greg Burghardt's user avatar
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 ...
Karl Bielefeldt's user avatar
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 ...
Greg Burghardt's user avatar
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 ...
candied_orange's user avatar
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 ...
JacquesB's user avatar
  • 57.9k
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 ...
Berin Loritsch's user avatar
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. ...
Ian's user avatar
  • 4,604
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 ...
mmathis's user avatar
  • 5,438
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....
James McMahon's user avatar
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 ...
Caleth's user avatar
  • 10.7k
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 ...
Gernot's user avatar
  • 726
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 ...
Christian Specht's user avatar
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 ...
Pieter B's user avatar
  • 13.2k
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 ...
Kilian Foth's user avatar
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 ...
Paddy's user avatar
  • 2,623
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 (%...
Sebastian Redl's user avatar
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 ...
Steve Jessop's user avatar
  • 5,101
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 ...
enderland's user avatar
  • 12.1k
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 ...
nicoespeon's user avatar
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 ...
Bradley Thomas's user avatar
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 ...
EMarshall's user avatar
  • 439
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 ...
Bart van Ingen Schenau's user avatar
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 ...
soru's user avatar
  • 3,625

Only top scored, non community-wiki answers of a minimum length are eligible