-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig.master
80 lines (76 loc) · 3.43 KB
/
.gitconfig.master
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
[user]
name = Philip Daniels
email = [email protected]
[color]
ui = true
[credential]
# Store passwords in RAM for 6 days (6 * 24 * 60 * 60).
helper = cache --timeout=518400
[core]
editor = micro
pager = less -x4 -d
# Do not do any conversion. Always keep whatever the file was entered with.
# This seems to be best for files that you need to use on different systems
# (Linux, MSysGit, Cygwin). It requires Windows machines to know
# about and preserve files with LF endings, which most modern tools do.
# See http://stackoverflow.com/questions/170961 and 13960696
# In practice THIS SHOULD BE IGNORED because you should create a
# .gitattributes file in every repo. See my question & answer at
# http://stackoverflow.com/questions/24577629/git-line-endings-after-normalization
autocrlf = false
# Stop git whining about CRLF/LF conversions on Windows.
safecrlf = false
[push]
default = simple
[alias]
s = status
ss = status --short
m = commit -m
aamend = commit -a --amend --no-edit
amend = commit --amend --no-edit
a = add -A
b = branch -a -vv
c = diff --check
cc = diff --check --cached
co = checkout
cob = checkout -b
cod = checkout develop
com = checkout master
fmoff = config core.fileMode 0
fmon = config core.fileMode 1
rod = rebase -i origin/develop
# Do a git add followed by a git status. This is the syntax to define ashell function,
# which can be used to execute arbitrary commands.
as = "'!f() { git add .; git status; }; f'"
# Delete a branch locally and on the remote. See
# http://stackoverflow.com/questions/2003505/how-do-i-delete-a-git-branch-both-locally-and-remotely
rmbranch = "!f(){ git branch -d ${1} && git push origin --delete ${1}; };f"
# See which commits are in one but not the other. Uses < and > markers to indicate left and right.
compare = log --left-right --graph --cherry-pick --oneline
# The color names correspond to those in the palette. (Idx = logical color
# name). Note that the actual color may be nothing like "red" or "green",
# it depends on the terminal palette.
# 0 = black, 1 = red, 2 = green, 3 = yellow,
# 4 = blue, 5 = magenta, 6 = cyan, 7 = white
# Prefixing with bold adds 8 to all the colour indexes (i.e. now 8..15)
# and selects the "bright" aka "bold" variants. There is also the "normal"
# colour which is whatever the foreground is. You may also use the
# modifiers bold, dim, ul, blink and reverse. If two colours are given the
# first is the foreground and the second is the background.
l = log -20 --graph --all --abbrev-commit --pretty=format:'%C(yellow)%h%C(bold red) %ci%x08%x08%x08%x08%x08%x08%x08%x08%x08%C(white)%d%C(reset) %s %C(blue)%ae'
# An example of how to setup aliases for git subtree pull and push commands.
# See my answer at http://stackoverflow.com/questions/24038147/managing-third-party-assets/
# mupull = subtree pull --prefix MiscUtils --squash [email protected]:PhilipDaniels/MiscUtils.git master
# mupush = subtree push --prefix MiscUtils [email protected]:PhilipDaniels/MiscUtils.git master
# Setup the GUI diff and mergetools. You can pick which one by uncommenting the relevant lines.
[merge]
conflictstyle = diff3
tool = kdiff3
[mergetool]
prompt = false
keepBackup = false
[diff]
guitool = kdiff3
tool = kdiff3
[difftool]
prompt = false