Skip to content

Instantly share code, notes, and snippets.

@bleach
Last active September 8, 2018 07:48
Show Gist options
  • Save bleach/318afc33a582a6f005655bdf9d6a547c to your computer and use it in GitHub Desktop.
Save bleach/318afc33a582a6f005655bdf9d6a547c to your computer and use it in GitHub Desktop.

Git workflow

Note for Apply team members: This is replaced by the working with git guide; that also has details of working practices we agreed in earlier retros and can be edited by multiple members of the team (this gist can only be edited by me, so is an unsuitable place for long term team documents).

Get local master up to date

git checkout master && git pull

Branch from master

git checkout -b feature/ap-999-add-a-thing

Add small, atomic commits

git commit

Rebase your branch from master

git checkout master
git pull
git checkout feature/ap-999-add-a-thing
git rebase master

If there are conflicts, be very clear that you are not undoing other peoples' work when resolving them.

[Optional] reword or re-order commits

git rebase -i master

Create PR

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