I have a git server where my project reside, I have a laptop that I often work on, a work computer that I use a lot and a desktop at home. The general GIT workflow I have no problem with (branching, merging, tagging etc.), but how do I make sure that I don’t have any changes laying on one of the computers when I start working on another one? All the computers has my project cloned, but rarely do I have a change worth commiting when I have to leave the computer. To deal with this I have a tendency to just push a commit I call “Save” with all my small unrelated file changes every time I’m done working. Then I do a pull when I start working on another computer.
This seems like a hacky solution though and I have a feeling certain people would punch me in the face if they saw how I was using GIT. I just can’t see any alternatives to this short of carrying only one checkout of my project around on a thumb drive.
So I ask you professionals: How do you deal with working with multiple clones of a project on different computers?
Examples
- A thumb drive with only one clone of the project?
- Somehow making temporary commits that you pull and delete later?
- Some clever “save” branch that is used for this purpose only?
- Does GIT perhaps have support for this issue built-in? Online stashing?
- etc…
I didn’t think it would happen, but I found a perfect solution: Dropbox!
I simply keep my “working copy” repository in the Dropbox folder at all times. The working copy will sync between all my development PCs. I can’t think of a reason why this isn’t an absolutely perfect solution, looking away from the obvious but negligible drawback that I require an internet connection at all times.
I’m guessing the new Google Drive will do the same job.