News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

git development workflow with two working copies

Started by ollydbg, August 31, 2016, 04:31:17 PM

Previous topic - Next topic

ollydbg

I found that Multiple working directories with Git? - Stack Overflow is a very nice feature for recent git version. For windows, I now use the latest git-for-windows 2.9.x version.

I used to maitain several branches for a single working copy, one branch A has many commits beyond the original/git-svn, and one branch B is for git svn dcommit only. Before using the new git feature, I need to check out A or B, and this always need to rebuild A or B after the switch.

But with the new feature for now, I can have A and B in different directories, and they share the same local repo. I can simply cheery pick some useful commits from A to B, and then build and test B, and finally git svn dcommit from B. Very nice workflow.  :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.