Skip to content
conmurphy edited this page May 20, 2019 · 18 revisions

Contributions

Git Branching Basic Process Commands

git checkout -b <your-branch-name> = moves you to the branch listed

git add <files>

git commit -m <commit-message>

git push origin <your-branch-name>

Go to the Github GUI and create pull request

If the pull request does not show any errors, you can merge it from there.

Cleanup merged branches

  1. Find out which branches have already been merged (won't show the master branch)

git branch --merged| egrep -v "(^\*|master)"

  1. Tag branch to make it retrievable at a later stage if needed

git tag archive/<branch-to-delete>

  1. Delete branch locally

git branch -d <branch-to-delete>

  1. Delete branch in the central Github site (none local)

git push --delete origin <branch-to-delete>

Useful commands

git status
git log