3 ms·
I have three branches: macbook, imac, and develop. develop is the mainline branch that other people could pull from. macbook and imac are each backups of thei
by bsimpson 5y ago
I have three branches: macbook, imac, and develop.
develop is the mainline branch that other people could pull from.
macbook and imac are each backups of their respective machines. I use git merge --ff-only to rebase commits from one to the other when I change machines. If I need to change machines midway through a commit, I'll push a WIP commit to imac, fastforward macbook to match, and then git reset HEAD^ to keep the WIP files (but undo the commit) on macbook. I finish on macbook, make the commit, and push it to origin's macbook and develop.
Like the others here, I make liberal use of git rebase -i to reorder commits, etc. If imac and macbook ever diverge (e.g. I forgot to push a commit before changing machines), I also use interactive rebase to resolve it.