Author Topic: git development workflow with two working copies  (Read 3149 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
git development workflow with two working copies
« on: August 31, 2016, 04:31:17 pm »
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.