forked from ryanb/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgitconfig.erb
More file actions
51 lines (51 loc) · 1.85 KB
/
gitconfig.erb
File metadata and controls
51 lines (51 loc) · 1.85 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
49
50
51
[user]
name = <%= print("Your Name: "); STDOUT.flush; STDIN.gets.chomp %>
email = <%= print("Your Email: "); STDOUT.flush; STDIN.gets.chomp %>
[alias]
co = checkout
st = status -sb
co = checkout
msg = commit --allow-empty -m
# Pretty!
# via http://andyjeffries.co.uk/articles/25-tips-for-intermediate-git-users
lol = log --pretty=oneline --abbrev-commit --graph --decorate
unstage = reset HEAD
done = !git fetch && git rebase origin/master && git checkout master && git merge @{-1} && bundle exec rake && git push
# Merge current branch into master, only if it's a fast-forward. Doesn't check
# out master if it's not a FF merge.
mm = !test `git rev-parse master` = $(git merge-base HEAD master) && git checkout master && git merge HEAD@{1} || echo "Non-fastforward"
up = !git fetch origin && git rebase origin/master
aa = add .
# Not yet added - doesn't include ignored files
new = ls-files --others --exclude-standard
# Files that are in the staging area
added = diff --cached --name-only
today = log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative
plre = pull --rebase
ff = merge --ff-only
newauthor = commit --amend --reset-author -C HEAD
prune-remotes = remote prune origin
next = !git add . && git rebase --continue
unfuck = reset --hard HEAD
pu = !"git fetch origin -v; git fetch upstream -v; git merge upstream/master"
# Typos
pul = pull
[color]
diff = auto
status = auto
branch = auto
[core]
excludesfile = <%= ENV['HOME'] %>/.gitignore
editor = vim
autocrlf = input
[apply]
whitespace = nowarn
[format]
pretty = %C(yellow)%h%Creset %s %C(red)(%an, %cr)%Creset
[github]
user = <%= print("GitHub Username: "); STDOUT.flush; STDIN.gets.chomp %>
token = <%= print("GitHub API Token: "); STDOUT.flush; STDIN.gets.chomp %>
[push]
default = tracking
[rerere]
enabled = 1