Skip to content

Instantly share code, notes, and snippets.

@clcollins
Created July 30, 2018 16:47
Show Gist options
  • Save clcollins/45cca8d2b3907a37d998e0215698acf4 to your computer and use it in GitHub Desktop.
Save clcollins/45cca8d2b3907a37d998e0215698acf4 to your computer and use it in GitHub Desktop.
Git Cheet Sheet

Working With Forks/Upstream

Get Upstream Tags

Update Git config

Add this to the [upstream] section in .git/config

fetch = +refs/tags/*:refs/tags/*

Fetch Upstream

git fetch upstream

Tag stuff from the Git Book

https://git-scm.com/book/en/v2/Git-Basics-Tagging

List tags

git tag

Create tag

git tag -a v1.4 -m "my version 1.4"

Tag past commits

git tag -a v1.2 9fceb02

Push a tag

git push origin v1.5

Checkout a tag

git checkout 2.0.0

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