-
-
Save fractalspace/3797162 to your computer and use it in GitHub Desktop.
Susan Potter's .gitconfig file from November 2007 blog post. Updated since November 2007 with new aliases or options.
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
# Migrating my old .gitconfig blog post from 2007 to here so I can update it easier. | |
# Original URL: | |
# http://geek.susanpotter.net/2007/11/my-gitconfig.html | |
[user] | |
name = Susan Potter # make sure you change this | |
email = [email protected] # make sure you change this | |
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
[diff] | |
rename = copy | |
color = auto | |
[apply] | |
whitespace = strip | |
[pager] | |
color = true | |
[status] | |
color = auto | |
[branch] | |
autosetuprebase = always | |
[alias] | |
co = "checkout" | |
ci = "commit" | |
ciall = "commit -a -v" | |
unmerge = "reset --hard ORIG_HEAD" | |
lsbr = "branch -a" # list all branches, even remote ones | |
mkbr = "branch" # create branch if you specify a branch name after it, e.g. git mkbr upgrading_rails | |
# remove branch named after it, e.g. git rmbr upgrading_rails | |
rmbr = "branch -d" | |
# rename branch from one name to another | |
mvbr = "branch -m" | |
# | |
track = "branch --track" | |
log = "log -p" | |
lol = "log --graph --decorate --pretty=oneline --abbrev-commit" | |
lola = "log --graph --decorate --pretty=oneline --abbrev-commit --all" | |
# list remote repositories | |
lsrem = "remote" | |
# list all tags, to keep commands consistent, e.g. git lstag | |
lstag = "tag -l" | |
# list unmerged branches | |
lsunmerged = "branch --no-merged" | |
# create a new tag based on specified commit | |
mktag = "tag -a" | |
# remove existing tag by name | |
rmtag = "tag -d" | |
# rename tag from one name to another | |
mvtag = "tag -m" | |
# create new remote repository for project | |
mkrem = "remote add" | |
# initialize all submodules | |
modinit = "submodule init" | |
# update all submodules | |
modup = "submodule update" | |
# show status of all submodules | |
modst = "submodule status" | |
# add new submodule, i.e. git modadd module-name url | |
modadd = "submodule add" | |
# push local committed changes to rubyforge and origin (usually GitHub) | |
osspush = !git push rubyforge master && git push origin master | |
# pull changes from rubyforge and origin (usually GitHub) | |
osspull = !git pull rubyforge master && git pull origin master | |
# sync (pull then push) from rubyforge and origin (usually GitHub) | |
osssync = !git osspull && git osspush | |
# show last 15 log entries | |
recentlog = "log -n 15" | |
# search alias | |
search = "log --pretty=short -S" | |
# short log | |
shlog = "log --oneline --decorate" | |
# snap RPEO | |
snap = "clone --depth 1" | |
# show status, keep same as svn command I used most frequently | |
st = "status --porcelain" | |
# another alias for status that some scripts might use | |
stat = "status --porcelain" | |
# fetch and rebase from svn repository | |
spull = !git svn fetch && git svn rebase | |
# push keeping each local commit as atomic. | |
spush = !git svn dcommit | |
# tracking push | |
tpush = "push -u" | |
# pull & update submodules at once - assumed you are on tracking local branch | |
up = !git pull && git submodule update | |
# word diff | |
wdiff = "diff --word-diff" | |
# prints out the branches a commit is on | |
whbr = "branch -a --contains" | |
# prints commits from a branch are already present upstream | |
whci = "cherry -v" | |
# prints out the tags a commit is a part of | |
whtag = "name-rev --name-only" | |
[rerere] | |
enabled = 1 | |
[merge] | |
tool = gvimdiff | |
[url "https://github.com/"] | |
insteadOf = "gh:" | |
[url "[email protected]:"] | |
insteadOf = "git@gh:" |
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
set show-author = abbreviated | |
set show-date = relative | |
set show-rev-graph = yes | |
set show-refs = yes | |
set show-line-numbers = yes | |
set line-number-interval = 5 | |
set tab-size = 2 | |
set commit-encoding = "UTF-8" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment