-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
51 lines (50 loc) · 1.8 KB
/
.gitconfig
File metadata and controls
51 lines (50 loc) · 1.8 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
[alias]
a = !git add --all && git status -s
b = "!f(){ if [ `git rev-parse --verify $1 2>/dev/null` ]; then git checkout $1; else git checkout -b $1; fi ;};f"
bl = branch -a --format '%(refname:short)'
c = commit
ca = commit --amend --no-edit
cae = commit --amend
clo = "!f(){ cd $PROJECT_DIR && git clone $1 ;};f"
co = !git bl | fzf --ansi --preview \"git log --color=always --oneline {}\" | sed \"s|origin/||\" | xargs -r git checkout
cob = checkout -b
com = !git checkout $(git fn-default-branch)
cp = cherry-pick
cpc = cherry-pick --continue
cpa = cherry-pick --abort
d = diff
wd = diff --word-diff
ds = diff --cached
f = fetch
fa = fetch --all
fu = fetch upstream
fx = !git fn-select-commit | xargs -r git commit --fixup
l = log
ls = !git config --get-regexp ^alias | sed \"s|alias\\.||\" | sed \"/^fn-/d\"
p = push
pf = push -f
pu = pull
r = !git fn-select-commit | xargs -r git reset
ra = rebase --abort
rc = rebase --continue
rh = reset --hard
rhom = !git reset --hard origin/$(git fn-default-branch)
rhum = !git reset --hard upstream/$(git fn-default-branch)
ri = !git rebase -i $(git fn-select-commit)
rs = rebase --skip
s = status
sp = stash pop
sq = !git rebase --interactive --autosquash $(git fn-default-branch)
st = stash
u = pull
up = !git branch --set-upstream-to=origin/$(git branch --show-current) $(git branch --show-current)
us = restore --staged .
fn-default-branch = !git remote show origin | grep 'HEAD branch:' | awk '{print $3}'
fn-select-commit = !git log --color=always --pretty=format:'%C(white)%h %C(cyan)%s' | fzf --ansi --preview \"git show --color=always {1}\" | awk '{print $1}'
[push]
default = current
[pull]
rebase = true
[user]
email = github@amund.io
name = Amund Tenstad