Last active
January 30, 2017 23:18
-
-
Save AndreiRailean/3e5c2115ddee8bd7ceed to your computer and use it in GitHub Desktop.
Aliases for Git Config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Andrei Railean | |
email = [email protected] | |
[alias] | |
co = checkout | |
cob = checkout -b | |
st = status | |
s = status | |
ci = commit | |
c = commit | |
br = branch | |
last = log -1 HEAD | |
a = add | |
d = diff | |
mum = merge upstream/master | |
fu = fetch upstream | |
mm = merge master | |
rum = rebase upstream/master | |
ca = commit --amend | |
# Unstage any files that have been added to the staging area | |
unstage = reset HEAD | |
# Show changes that have been staged | |
diffc = diff --cached | |
# wc == what changed | |
wc = diff-tree --no-commit-id --name-status -r | |
# Mark a file as "assume unchanged", which means that Git will treat it | |
# as though there are no changes to it even if there are. Useful for | |
# temporary changes to tracked files | |
assume = update-index --assume-unchanged | |
# Reverse the above | |
unassume = update-index --no-assume-unchanged | |
# Show the files that are currently assume-unchanged | |
assumed = "!git ls-files -v | grep ^h | cut -c 3-" | |
# Delete any branches that have been merged into master | |
# See also: https://gist.github.com/robmiller/5133264 | |
delete-merged-branches = "!git co master && git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" | |
# Checkout our version of a file and add it | |
ours = "!f() { git checkout --ours $@ && git add $@; }; f" | |
# Checkout their version of a file and add it | |
theirs = "!f() { git checkout --theirs $@ && git add $@; }; f" | |
# Search/grep your entire codebase for a string: | |
grep = grep -Ii | |
gr = grep -Ii | |
[core] | |
editor = vim | |
ignorecase = false | |
[push] | |
default = matching | |
[credential] | |
helper = osxkeychain | |
[commit] | |
gpgsign = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment