forked from bcaddy/dotfiles-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
37 lines (36 loc) · 1.1 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
[core]
editor =
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
[init]
defaultBranch =
[user]
name =
email =
username =
[github]
user =
token =
[commit]
template = ~/dotfiles/git-message-template.txt
[pull]
rebase = false
[alias]
stick = log --oneline --decorate --graph --all -n 30 #my prefered version of git log
stat = status #short version of status
com = commit
check = "!f() { \
Repo-check-updates.sh; \
}; f"
new = !sh -c 'git log $1@{1}..$1@{0} "$@"' #Show commits created by last command
edit = "!f() { \
/Users/Bob/Applications/Visual\\ Studio\\ Code.app/Contents/Resources/app/bin/code $(git status --short | awk '$1 ~ /^M|A|U/ {print $2}' ); \
}; f" #opens all unstaged files for editing in VS Code
hub = "!f() { \
if [[ "$OSTYPE" == "darwin"* ]]; then \
git remote -v | grep [email protected] | grep fetch | head -1 | cut -f2 | cut -d' ' -f1 | sed -e's,:,/,' -e 's,git@,http://,' | xargs open; \
else \
git remote -v | grep [email protected] | grep fetch | head -1 | cut -f2 | cut -d' ' -f1 | sed -e's,:,/,' -e 's,git@,http://,'; \
fi; \
}; f"
[include] #get gpg info
path =