views:

489

answers:

2

Hello everyone,
Sorry for this horrid, horrid question.. but there's no way for me to not use VSS.

I would like to be able to use Git locally for branch development, etc. while using Visual Source Safe 6. My knowledge of all of the ins and outs of Git is limited at the moment, as I'm a recent convert.

Question:
What I would like to be able to do is work within a Git repository. I would like to do this and get all of the goodies that this will allow with branching, etc. At the end of my day, or at other needed moments I would like to be able to take whatever work I'm doing and place it into the master repository which I would then place into VSS.

Ideally, at the start of the work day I would get VSS latest version.. commit this to Git.. then work on an alternate branch, putting the changes back into master when I needed to commit to VSS.

Being that I am a relative git newbie, what might be the best way to accomplish this.. along with the best commands to issue/way to set this up.

*note: Source Safe needs the file checked out before changes can be made to it I think. Maybe there is some tool / script I can use to help automate this for pushing changes back into VSS ?

Thank you!

+1  A: 

I would ask why you have to use VSS? Which person is forcing this upon you? Have you shown them the many reasons not to? If your team is going to do any real development work, VSS is a liability, and a horrendous one at that. I, personally, lost an entire project due to the VSS corruption problem. (Fortunately, I had taken heavy precaution and had backed up previously.)

I know I'm not answering your question, but, since you seem to understand the horror that is VSS, maybe some of those links can provide ammo to help out your argument to switch to GIT completely.

JasCav
If I could, I would. Sadly it's just something I have to deal with.. fortunately, I'm the only one working on the project and others mostly use VSS to get the latest version and/or make small updates. Learning Git and switching will not happen right now.. it's on my list. :)
Matthew M.
Thank you for the links as well, at some point I will attack on the source control situation. For now, I must live with it.. but I'll find a way to bend the 'rules'. :)
Matthew M.
+1  A: 

The setup you're considering should work fine. For git commands just check the tutorials.

The workflow I've used (not with VSS, but the concept is the same) is something like:

  • Checkout from main (i.e. VSS)
  • Keep one "trunk" branch that is in sync with VSS
    • will always be kept clean
  • Develop in branches branched from "trunk"
  • Updating from VSS:
    • switch to "trunk"
    • update with VSS
    • git commit the changes
    • rebase the branches that are branched from trunk
  • To push changes to VSS:
    • push changes from the development branch to "trunk"
    • switch to "trunk"
    • VSS commit the changes
orip
How would I get around the VSS need to have files checked out so that it knows what to commit.. and on the same token, those files that are added ?
Matthew M.
hmm, you're right, tough one (I wasn't thinking VSS specifically). I would probably write a script that looks at the files changed since the last sync (modified / added / deleted) and does the appropriately add/checkout/delete through the command-line VSS interface.
orip
I think you're right. To do this 'right' I'll have to build some scripts to take care of these things. Definitely going to be a challenge.
Matthew M.
if you are certain no-one else has changed anything you can get away with checking out the entire project without replacing your local copies and check everything back in. If there is a possibility for someone else to have changed something you'r working on, you should checkout everything at the start of the day, do your work and checkin at the end of the day to make sure you never overwrite someone elses work.
Lieven
I'd be very interested if you get the script working! As our company uses VSS to! dumb arses. PM me if you get anywhere! cheers. Ian
IanVaughan
BTW - someone put up their workflow with Mercurial and VSS, could work similarly with git. Basically, checks out all files in VSS for the commit. http://stackoverflow.com/questions/811999/combine-dvcs-with-visual-source-safe
orip