Skip to content

Instantly share code, notes, and snippets.

@dmulvi
Last active May 23, 2017 17:28
Show Gist options
  • Save dmulvi/2baffcc2f58b4c058ac8e043343e1a07 to your computer and use it in GitHub Desktop.
Save dmulvi/2baffcc2f58b4c058ac8e043343e1a07 to your computer and use it in GitHub Desktop.
Git Commands
# compare two branches (master and temp)
git log --graph --decorate --pretty=oneline --abbrev-commit master origin/master temp
# pull an old file and overwrite current
git checkout 'master@{7 days ago}' -- path/to/file.txt
# log changes before a date
git log --stat --before="2017-05-09"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment