The branching strategy I’ve found most effective and flexible is to use one branch per release version that is used for integration and feature branches off these for everything else.
It’s hard to visualise and I’ve tried drawing graphs but once I build in enough features to make the graph meaningful it is no longer easy to interpret.
I used to use subversion and svnmerge a lot, and there’s just one thing I miss about it. Now svnmerge is a tool to bolt on merge tracking to svn, and gits merge tracking is vastly better in many ways. But the one thing that svnmerge allowed me to do that was cool and doesn’t have a real equivalent in git is to block commits
I’m working on a project where I find I want to semi-regularly adjust a config file for local testing, but want to be sure I don’t commit that file by mistake.
Seems the best approach is
git update-index --skip-worktree $filename
This tells git to skip this file when I push, if the remote file changes it will warn me
I’ve been looking into Gitflow recently, it’s an interesting set of scripts to facilitate a successful git branching model which some of the people I work with rave about.
In the end I’ve decided I don’t like the tool or the model, though both are interesting.