Skip to content

Instantly share code, notes, and snippets.

@schmich
Created August 11, 2019 07:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schmich/d987120c068c764f3ef2fca8f8aa6c53 to your computer and use it in GitHub Desktop.
Save schmich/d987120c068c764f3ef2fca8f8aa6c53 to your computer and use it in GitHub Desktop.
Multi-machine feature branch git workflow

Machine 1

Create a feature branch and sync it to origin.

git checkout -b person/feature-branch
git push -u

Machine 2

Checkout feature branch from origin.

git checkout -t origin/person/feature-branch

Integrating & Cleanup (Machine 1)

git checkout parent-branch
git merge person/feature-branch
git push
git branch --merged
git branch -d person/feature-branch
git push origin --delete person/feature-branch

Cleanup (Machine 2)

git branch -d person/feature-branch

Pruning Branches

git fetch --prune
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment