-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitconfig
More file actions
48 lines (48 loc) · 2.1 KB
/
gitconfig
File metadata and controls
48 lines (48 loc) · 2.1 KB
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
[user]
name = Andrew Horsman
email = minirobotics@gmail.com
[core]
editor = vim
excludesfile = /Users/andrew/.gitignore
[colour]
diff = auto
status = auto
branch = auto
[diff]
color = auto
[alias]
a = add # Add.
ac = commit -a -m # Add all files and commit with message.
aws = !git add . && git ss # Add all files and show status.
last = log -1 --stat # Show last commit.
lastd = log -1 --stat -p # Show last commit with diff.
ls = log --pretty=oneline
l = log # w00t, log.
lf = log --pretty=full # Full log.
lff = log --pretty=fuller # Fuller log.
c = commit -m # Commit with message.
ca = commit --amend # Amend commit.
d = diff HEAD HEAD~1 # Get a diff between the last commit and second last commit.
wd = !git diff $1 HEAD:$1 # Get a diff between the committed version of a file and the working version of a file.
s = status # Full status.
ss = status -s # Short statuses
t = tag # Tag current commit.
b = branch # List branches.
db = branch -d # Delete a branch.
cb = checkout # Checkout a branch.
ccb = checkout -b # Create a new branch and checkout.
m = merge # Merge a branch to the current one.
r = rebase # Rebase a branch onto the current one.
p = push # Push branch.
f = fetch # Fetch remote.
fu = fetch upstream # Fetch upstream branches.
rv = remote -v # List all remotes.
bv = branch -a # List all (including remote) branches.
gh = "!f() { git remote add $1 git@github.com:$2; }; f" # Add a remote branch from GitHub
un = reset HEAD # Unstage files.
graph = log --graph --oneline # ASCII graph.
sub = submodule update --init --recursive # Initialize and pull all submodules.
st = stash # Stash current changes.
sl = stash list # List stashes.
as = stash apply # Apply a stash.
asl = stash apply stash@{0} # Apply last stash.