My current .gitconfig:
[user]
name = James Bowes
email = $EMAIL_ADDRESS
[alias]
ci = commit -a
co = checkout
st = status
praise = blame
br = branch
diffstat = diff --stat
cat = !cat @
ds = diff --stat
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
[apply]
whitespace = warn
[diff]
rename = copy
renamelimit = 600
[pager]
color = true
[color]
branch = auto
diff = auto
interactive =auto
status = auto
[push]
default = upstream
[github]
user = jbowes
token = $GITHUB_TOKEN
I cribbed lol and lola from Adrian. Naturally, there's now a github section. I get the most use out of diff.renamelimit, which helps me when I'm doing merges in large projects like Candlepin, and the ds alias, which gives me a good overview of how much work I've done prior to a commit.
I recommend you:
ReplyDelete[push]
default = tracking
When you are in tracking branch and do "git push" it does "git push origin tracking_local:tracking_remote"
@Unknown good tip!
ReplyDeleteI've updated my post with that, but using the new syntax, default = upstream
These two are critical in my gitconfig:
ReplyDeleteuncommit = reset --soft HEAD^
unstage = reset