My employer still uses VisualSourceSafe6. Everything is checked-in into the main project directory in VSS. They are not using branching in VSS. Check-in's are supposed to be ready for release to QA and should not break the build (not enforced).
I want to use git as my local repository so I can track changes per feature (branch) and have history of my changes before I commit them to VSS. I need this because some of the changes might span more than 3-4 days before they can be checked-in to VSS.
NOTE: my understanding for some git concepts is very new and might be offbase.
After reading these similar questions:
- Using Git with Visual Source Safe 6.0
- How Best Can I Use Git When My Employer Uses VSS?
- Combine DVCS with Visual Source Safe
Following is what I was thinking of doing:
C:\VSS\ProjectA where I perform VSS specific actions get-latest-version, chechout, and checkin etc. The solution/project file will have bindings to VSS since other developers will still use VSS and some might use git with VSS like me.
C:\MY\ProjectA where I will be doing my development work and using git workflows.
To setup the folders I did:
- Get latest version from VSS into
C:\VSS\ProjectA
C:\VSS\ProjectA>git init
andC:\VSS\ProjectA>git add .
, this becomes my master branchgit clone C:\VSS\ProjectA C:\MY\ProjectA
, this becomes my development clone
Q: If I have VSS bindings in my solution/project file, VisualStudio will try and connect to VSS even from my git cloned folder C:\MY\ProjectA
. So I need to remove the VSS bindings after cloning, correct?
When working on a feature I need to:
- get latest version from VSS into
C:\VSS\ProjectA
- Q: do I need to commit the changed file to the master git repository?
C:\MY\ProjectA>git fetch
andC:\MY\ProjectA>git checkout
, Q: correct?- do whatever branching, commits, merge, rebase etc in my development repository
- get diff of my development repository and master repository and checkout those files in VSS
C:\MY\ProjectA>git push
, Q: correct?C:\VSS\ProjectA>git checkout
, Q: correct?C:\VSS\ProjectA>git commit
, Q: correct?- checkin changed files to VSS
UPDATE it seems git for windows (VisualStudio2015) does not yet support pushing to non-bare local repositories, is there any workaround?