Last active
July 11, 2021 04:22
-
-
Save greenbicycle/0ce204435027ad396d6b070e3153b5cc to your computer and use it in GitHub Desktop.
.gitconfig file for a Mac
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
# Change the stuff in angle brackets <> | |
[user] | |
name = <Your name> | |
email = <[email protected]> | |
[core] | |
autocrlf = input | |
safecrlf = true | |
pager = | |
excludesfile = /Users/<username>/.gitignore_global | |
editor = nano | |
[alias] | |
co = checkout | |
ci = commit | |
st = status | |
br = branch | |
bc = branch --contains | |
oneline = log -n 20 --oneline --format=format:'%C(bold cyan)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' | |
type = cat-file -t | |
dump = cat-file -p | |
staged = diff --staged | |
unmerged = diff --name-only --diff-filter=U | |
untracked = ls-files --others --exclude-standard | |
merge = merge -Xignore-all-space | |
changed = diff --name-only HEAD^ | |
contains = branch --contains | |
graph = log --graph --abbrev-commit --date=iso | |
hash = log -n 1 --format=format:'%h' | |
[push] | |
default = current | |
[difftool "sourcetree"] | |
cmd = opendiff \"$LOCAL\" \"$REMOTE\" | |
path = | |
[mergetool "sourcetree"] | |
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" | |
trustExitCode = true | |
[filter "media"] | |
clean = git-media-clean %f | |
smudge = git-media-smudge %f | |
[color] | |
ui = true | |
[color "branch"] | |
current = blue | |
local = cyan bold | |
remote = green bold | |
[color "diff"] | |
meta = white | |
frag = red bold | |
old = yellow dim | |
new = green bold | |
whitespace = white reverse | |
[color "status"] | |
added = green | |
changed = yellow | |
untracked = red | |
branch = magenta | |
[commit] | |
template = ~/.git | |
[format] | |
pretty = format:%C(bold cyan)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset) | |
[merge] | |
tool = opendiff | |
[diff] | |
tool = opendiff | |
[mergetool] | |
keepBackup = false | |
[format] | |
pretty = format:%C(bold cyan)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%$ | |
[merge] | |
tool = opendiff | |
[diff] | |
tool = opendiff | |
[mergetool] | |
keepBackup = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I added
git bc
forgit branch --contains
since I have been using that a lot.