I work on multiple systems throughout the day. I’ve been trying to figure out a strategy to sharing my current working directory between the two systems.
The code is hosted on Github as a private repo. I was thinking of using a bare repo in dropbox like this:
Github
|
Dropbox(bare repo)
/ \
Desktop Laptop
I’m trying to avoid having tons of bogus checkins in my repo just so that the code is shared between the two systems. I tested this out, and it seemed to work to share code, but I’m thinking all the checkins will still pile up in the git log when i have to inevitably push from dropbox to github.
So my questions:
- Would there be a way to edit the commits (im thinking something like squashing a bunch of commits into one) before pushing from the dropbox bare repo to github?
- Should I be just putting the working directory into Dropbox (clone from github) and then using the code from there?
Skip Dropbox entirely. Instead, use topic branches for work in progress, then
rebaseor otherwise improve your history when you’re ready to merge tomaster.The workflow would look something like this:
git checkout -B <topic> master<topic>. Commit as often as you’d like, in whatever state you’d like.git push origin <topic><topic>and track it:git checkout --track origin/<topic>orgit pull origin <topic>if you already have it checked out.When you’re ready to merge with
masterorproduction, usegit rebase -ito give<topic>a logical, debuggable, maintainable history.