forked from janmoesen/tilde
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
74 lines (61 loc) · 2.5 KB
/
.gitconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
excludesfile = ~/.gitignore
[color]
ui = auto
[merge]
tool = vimdiff
# When merging, add a list of merged commits to the autogenerated commit
# message.
log = true
[push]
# Make "git push" or "git push <remote>" only push the current branch to
# the tracked branch (regardless of its remote name) as opposed to pushing
# all branches with a matching name on the remote. See "An asymmetry
# between git pull and push": http://longair.net/blog/?p=572
default = tracking
[alias]
# When doing "git git log" or some such, do not complain about "git" not
# being a valid Git command. This happens when copy-pasting examples, for
# instance.
git = !git
# Quickly view the latest commits using a helper script to massage the
# "git log" output.
l = tilde-log
# Like "git l", but show all and draw the history graph, too.
ll = tilde-log --graph
# Show a concise status of the working directory, along with the branch
# and the number of commits behind and/or ahead.
s = status --short --branch
# Quickly push to the most common destination.
pom = push origin master
# I know "pum" could just as well stand for "PUsh" instead of "PUll", but
# I am so used to "git pom" that "git pum" feels like a natural
# counterpart. I always try to rebase to prevent unnecessary merge
# commits.
pum = pull --rebase origin master
# Show the staged changes.
dc = diff --cached
# Like "git show myfile", but uses the last commit that changed "myfile".
showlast = log -n 1 -p
# Switch branches, creating them if necessary. I want to unlearn using
# "git checkout" for switching between branches because of the possible
# dataloss when not paying attention. (You could see the PEBKAC, but I
# could reply with another four letter acronym, slightly resembling TOFU.)
#
# Suppose I have modified a file named "password" and have two branches,
# "password-expiry-mechanism" and "password-reset-mail". If I want to
# switch to either branch, I would type "git checkout pass<Tab><Enter>",
# but the autocomplete would stop at "git checkout password" because of
# the ambiguity. Because I press <Enter> without really thinking, I have
# now reset my "password" file. With "git go pass<Tab><Enter>", I would
# simply have created a new branch called "password". (I would be forced
# to use "--" to separate paths from banch names, which is a Good Thing™.)
go = checkout -B
[user]
name = Elizabeth
email = emstanley@ua.edu