-
-
Save elena-roff/b7408d0b6e0f820611f2a76dcf2670f2 to your computer and use it in GitHub Desktop.
Sample of git config file (Example .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 = <name> | |
email = @gmail.com | |
username = <username> | |
[core] | |
editor = vim | |
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
excludesfile = ~/.gitignore | |
[web] | |
browser = google-chrome | |
[push] | |
default = matching | |
[color] | |
ui = auto | |
[color "branch"] | |
current = yellow bold | |
local = green bold | |
remote = cyan bold | |
[color "diff"] | |
meta = yellow bold | |
frag = magenta bold | |
old = red bold | |
new = green bold | |
whitespace = red reverse | |
[color "status"] | |
added = green bold | |
changed = yellow bold | |
untracked = red bold | |
[diff] | |
tool = vimdiff | |
[difftool] | |
prompt = false | |
[github] | |
user = <user> | |
token = token | |
[gitflow "prefix"] | |
feature = feature- | |
release = release- | |
hotfix = hotfix- | |
support = support- | |
versiontag = v | |
[alias] | |
a = add --all | |
ai = add -i | |
############# | |
ap = apply | |
as = apply --stat | |
ac = apply --check | |
############# | |
ama = am --abort | |
amr = am --resolved | |
ams = am --skip | |
############# | |
b = branch | |
ba = branch -a | |
bd = branch -d | |
bdd = branch -D | |
br = branch -r | |
bc = rev-parse --abbrev-ref HEAD | |
bu = !git rev-parse --abbrev-ref --symbolic-full-name "@{u}" | |
############# | |
c = commit | |
ca = commit -a | |
cm = commit -m | |
cam = commit -am | |
cem = commit --allow-empty -m | |
cd = commit --amend | |
cad = commit -a --amend | |
ced = commit --allow-empty --amend | |
############# | |
cl = clone | |
cld = clone --depth 1 | |
clg = !sh -c 'git clone git://github.com/$1 $(basename $1)' - | |
clgp = !sh -c 'git clone [email protected]:$(git config --get user.username)/$1 $1' - | |
############# | |
cp = cherry-pick | |
cpa = cherry-pick --abort | |
cpc = cherry-pick --continue | |
############# | |
d = diff | |
dp = diff --patience | |
dc = diff --cached | |
dk = diff --check | |
dck = diff --cached --check | |
dt = difftool | |
dct = difftool --cached | |
############# | |
f = fetch | |
fo = fetch origin | |
fu = fetch upstream | |
############# | |
fp = format-patch | |
############# | |
fk = fsck | |
############# | |
g = grep -p | |
############# | |
l = log --oneline | |
lg = log --oneline --graph --decorate | |
############# | |
ls = ls-files | |
lsf = !git ls-files | grep -i | |
############# | |
m = merge | |
ma = merge --abort | |
mc = merge --continue | |
ms = merge --skip | |
############# | |
o = checkout | |
ob = checkout -b | |
############# | |
pr = prune -v | |
############# | |
ps = push | |
psf = push -f | |
psu = push -u | |
pst = push --tags | |
############# | |
pso = push origin | |
psao = push --all origin | |
psfo = push -f origin | |
psuo = push -u origin | |
############# | |
psom = push origin master | |
psaom = push --all origin master | |
psfom = push -f origin master | |
psuom = push -u origin master | |
psoc = !git push origin $(git bc) | |
psaoc = !git push --all origin $(git bc) | |
psfoc = !git push -f origin $(git bc) | |
psuoc = !git push -u origin $(git bc) | |
psdc = !git push origin :$(git bc) | |
############# | |
pl = pull | |
pb = pull --rebase | |
############# | |
plo = pull origin | |
pbo = pull --rebase origin | |
plom = pull origin master | |
ploc = !git pull origin $(git bc) | |
pbom = pull --rebase origin master | |
pboc = !git pull --rebase origin $(git bc) | |
############# | |
plu = pull upstream | |
plum = pull upstream master | |
pluc = !git pull upstream $(git bc) | |
pbum = pull --rebase upstream master | |
pbuc = !git pull --rebase upstream $(git bc) | |
############# | |
rb = rebase | |
rba = rebase --abort | |
rbc = rebase --continue | |
rbi = rebase --interactive | |
rbs = rebase --skip | |
############# | |
re = reset | |
rh = reset HEAD | |
reh = reset --hard | |
rem = reset --mixed | |
res = reset --soft | |
rehh = reset --hard HEAD | |
remh = reset --mixed HEAD | |
resh = reset --soft HEAD | |
############# | |
r = remote | |
ra = remote add | |
rr = remote rm | |
rv = remote -v | |
rn = remote rename | |
rp = remote prune | |
rs = remote show | |
rao = remote add origin | |
rau = remote add upstream | |
rro = remote remove origin | |
rru = remote remove upstream | |
rso = remote show origin | |
rsu = remote show upstream | |
rpo = remote prune origin | |
rpu = remote prune upstream | |
############# | |
rmf = rm -f | |
rmrf = rm -r -f | |
############# | |
s = status | |
sb = status -s -b | |
############# | |
sa = stash apply | |
sc = stash clear | |
sd = stash drop | |
sl = stash list | |
sp = stash pop | |
ss = stash save | |
sw = stash show | |
st = !git stash list | wc -l 2>/dev/null | grep -oEi '[0-9][0-9]*' | |
############# | |
t = tag | |
td = tag -d | |
############# | |
w = show | |
wp = show -p | |
wr = show -p --no-color |
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Temporary files # | |
################### | |
*.swp | |
*.swo | |
*~ | |
# Packages # | |
############ | |
*.7z | |
*.dmg | |
*.gz | |
*.iso | |
*.jar | |
*.rar | |
*.tar | |
*.zip | |
# Logs and databases # | |
###################### | |
*.log | |
*.sql | |
*.sqlite | |
# OS generated files # | |
###################### | |
.DS_Store* | |
ehthumbs.db | |
Icon? | |
Thumbs.db | |
*.lock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment