Skip to content

Instantly share code, notes, and snippets.

@shbaz
Created September 2, 2011 10:48
Show Gist options
  • Save shbaz/1188369 to your computer and use it in GitHub Desktop.
Save shbaz/1188369 to your computer and use it in GitHub Desktop.
git snippets
#
# Misc good to have commands when using git
#
# Short and nice log
git log --pretty=oneline Path
# Create a new freestanding branch
git symbolic-ref HEAD refs/heads/<branch-name>
rm .git/index -ErrorAction SilentlyContinue
git clean -fdx
# Checkout files from version into current structure
git checkout <version> -- Paths/Files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment