Last active
December 21, 2015 05:49
-
-
Save hyrmn/6259521 to your computer and use it in GitHub Desktop.
my .gitconfig
This file contains 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 = Ben Hyrman | |
email = [email protected] | |
[core] | |
autocrlf = true | |
editor = vim | |
excludesfile = C:\\Users\\Ben\\Documents\\gitignore_global.txt | |
[credential] | |
helper = !~/AppData/Roaming/GitCredStore/git-credential-winstore | |
[merge] | |
keepBackup = false | |
tool = p4merge | |
defaultToUpstream = true | |
[mergetool "p4merge"] | |
cmd = p4merge.exe "$BASE" "$LOCAL" "$REMOTE" "$MERGED" | |
keepTemporaries = false | |
trustExitCode = true | |
keepBackup = false | |
[diff] | |
tool = p4merge | |
[difftool "p4merge"] | |
cmd = "p4merge.exe $LOCAL $REMOTE" | |
[push] | |
default = tracking | |
[pull] | |
rebase = true | |
[branch] | |
autosetupmerge = true | |
autosetuprebase = always | |
[alias] | |
st = status | |
ca = "!git add -A" && "git commit -m" | |
br = branch | |
up = "!f() { git co master; git fetch; git merge --ff-only origin/master; }; f" | |
fuckit = "!f() { git clean -d -x -f; git reset --hard; }; f" | |
co = checkout | |
df = diff | |
lg = log -p | |
del = branch -d | |
udel = branch -D | |
cob = checkout -b | |
ready = rebase -i origin/master | |
finish = "!f() { git co master; git merge $1; git push origin master; git del $1; }; f" | |
standup = "!git log --since yesterday --author `git config user.email` --date=short --pretty=format:'%ad - %s'" | |
weekly = "!git log --since 1.week --author `git config user.email` --date=short --pretty=format:'%ad - %s'" | |
today = log --stat --since yesterday --graph --pretty=oneline --abbrev-commit --date=relative | |
scoreboard = "!git log | grep '^Author' | sort | uniq -ci | sort -r" | |
accept-ours = "!f() { files=\"$@\"; [ -z $files ] && files='.'; git checkout --ours -- $files; git add -u $files; }; f" | |
accept-theirs = "!f() { files=\"$@\"; [ -z $files ] && files='.'; git checkout --theirs -- $files; git add -u $files; }; f" | |
ls = log --format=format:'%C(bold yellow)%h %C(reset) %s %C(green) [%an] %C(reset)' --decorate | |
ll = log --pretty=format:'%C(bold yellow)%h %C(reset) %s %C(green) [%an] %C(reset)' --decorate --numstat | |
lg1 = log --graph --all --format=format:'%C(bold yellow)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative | |
lg2 = log --graph --all --format=format:'%C(bold yellow)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''%C(white)%s%C(reset) %C(bold white)- %an%C(reset)' --abbrev-commit | |
lg = !"git lg1" | |
save = stash save | |
pop = stash pop --index | |
yolo = !git add -A && git commit -m \"$(curl -s whatthecommit.com/index.txt)\" && git push -f origin HEAD:master | |
[help] | |
autocorrect = 1 |
I'd probably go with ... && git push -f origin HEAD:master
, to make sure whatever you just committed ends up in master
.
Updated per @dahlbyk's feedback
(also of note, I have push set to current, so my normal workflow is just 'git push' on master once I've merged my branch in)
Got rid of the pull /rebase alias
Added fuckit alias courtesy of @khalidabuhakmeh
👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@datachomp pointed out that the git push should have a -force option on it. If you care enough to yolo, you care enough to yolo correctly.