Skip to content

Instantly share code, notes, and snippets.

@sicet7
Last active October 15, 2020 06:36
Show Gist options
  • Save sicet7/700baa4376beca3e00f0fa695798b176 to your computer and use it in GitHub Desktop.
Save sicet7/700baa4376beca3e00f0fa695798b176 to your computer and use it in GitHub Desktop.
My Aliases in my .gitconfig
[user]
email = example@example.com
name = Your Name
[alias]
assume = update-index --assume-unchanged
unassume = update-index --no-assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
ours = "!f() { git checkout --ours $@ && git add $@; }; f"
theirs = "!f() { git checkout --theirs $@ && git add $@; }; f"
unstage = reset HEAD
recreate = "!f() { [[ -n $@ ]] && git checkout \"$@\" && git unpublish && git checkout master && git branch -D \"$@\" && git checkout -b \"$@\" && git publish; }; f"
lcf = diff-tree --no-commit-id --name-only -r
rr = "!f() { git remote update \"$1\" --prune; }; f"
diww = "!f() { git diff -w \"$1^\" \"$1\"; }; f"
cho = checkout
st = status
chp = cherry-pick
[core]
fileMode = false
symlinks = false
[pull]
ff = only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment