Skip to content

Instantly share code, notes, and snippets.

@toadkicker
Created June 1, 2013 03:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toadkicker/5689216 to your computer and use it in GitHub Desktop.
Save toadkicker/5689216 to your computer and use it in GitHub Desktop.
Useful aliases for git
#ignore file(s), add file(s), list file(s)
assume = update-index --assume-unchanged
unassume = update-index --no-assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
#call your last stash a snapshot
snapshot = !git stash save "snapshot: $(date)" && git stash apply "stash@{0}"
#merging
ours = "!f() { git checkout --ours $@ && git add $@; }; f"
theirs = "!f() { git checkout --theirs $@ && git add $@; }; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment