-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitconfig
More file actions
59 lines (49 loc) · 1.72 KB
/
gitconfig
File metadata and controls
59 lines (49 loc) · 1.72 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
52
53
54
55
56
57
58
59
[alias]
st = status
br = branch
unstage = reset HEAD --
graph = log --graph --decorate --oneline
graphfull = log --graph --decorate --oneline --all
# Perform a blame but with depth in the history to ignore, replace, creation, copy, etc..
blame-deep = blame -w -C -C -C
# See file history
filelog = log -u
# Search branch by name
sbranch = "!git branch -a | grep"
# See te details of a commit
commit-details = diff-tree -p
# See te details of a commit
commit-details = diff-tree -p
# Show changes that have been staged
diffc = diff --cached
# Archive a branch by reacting a tag for it and removing the branch
archive-branch = "! f() { git tag archive/$1 $1 && git branch -D $1 && git push origin archive/$1 && git push origin :$1;}; f"
# UnArchive a branch by a tag "do not type 'archive/'"
unarchive-branch = "! f() { git checkout -b $1 archive/$1;}; f"
#Pull all branch from remote
offline = "!git fetch --all && for branch in `git branch -r | cut -s -d '/' -f2- | grep -v HEAD | grep -v remote | grep -v origin` ; do echo -e '\n\n\n-----START BRANCH-----' && git checkout $branch && git pull origin $branch && git status && echo '-----FINISH BRANCH-----' ; done"
#Clean old branches removed from remote
clean-old-branches = "!git fetch && git remote prune origin && git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}' | xargs git branch -d"
[color]
ui = true
[column]
ui = auto
[branch]
autosetuprebase = always
[core]
editor = vim
[merge]
tool = meld
[push]
default = current
followTags = true
[pull]
rebase = true
[help]
# Automatically correct and execute mistyped commands
autocorrect = 1
[rerere]
# Persist previous conflict resolutions
enabled = true
[include]
path = ~/dotfiles/untracked/gitconfig