Earlier quoted context omitted.
I have a similar one: lg2 = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen%cn%Creset %Cblue(%cr)%Creset' --abbrev-commit --date=relative Shows dates at the end, in a relative format (2 days ago, 29 hours ago, etc) and the tags/branches before the commit message.
So do I! lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue) %Creset' --abbrev-commit
Better Git configuration
11–20 of 66 posts
Re: Better Git configuration
#12 git config --global pull.ff only
I can always override an individual pull invocation with either "git pull --rebase" or "git pull --no-ff", making it a conscious choice when a fast-forward pull is not possible.Re: Better Git configuration
#13Re: Better Git configuration
#14Git doesn't check validity of commit hashes by default: https://groups.google.com/forum/#!topic/binary-transparency/...
Re: Better Git configuration
#15Don't set fsckobjects=true. There are normal repositories that have broken trees which will not download if you have it set. Yes it is irritating and I would rather turn it on, but I had to turn it off after several repos failed for me. Git doesn't check validity of commit hashes by default: https://groups.google.com/forum/#!topic/binary-transparency/...
Re: Better Git configuration
#16Don't set fsckobjects=true. There are normal repositories that have broken trees which will not download if you have it set. Yes it is irritating and I would rather turn it on, but I had to turn it off after several repos failed for me. Git doesn't check validity of commit hashes by default: https://groups.google.com/forum/#!topic/binary-transparency/...
Wouldn't it make sense to turn that off per-project when you encounter it?
IIRC, the jquery repo was an example of one with a bad object hash.
Re: Better Git configuration
#17Don't set fsckobjects=true. There are normal repositories that have broken trees which will not download if you have it set. Yes it is irritating and I would rather turn it on, but I had to turn it off after several repos failed for me. Git doesn't check validity of commit hashes by default: https://groups.google.com/forum/#!topic/binary-transparency/...
The fsckObjects settings are entirely separate from the SHA. They are about syntactic and semantic rules in the objects themselves (e.g., well-formatted committer name/dates, tree filenames that don't contain "/", etc).
Re: Better Git configuration
#18Re: Better Git configuration
#19What is the big deal about creating a merge commit? It that because you only merge in `origin` (wherever that lives)?
Re: Better Git configuration
#20> I will never accidentally create a merge commit What is the big deal about creating a merge commit? It that because you only merge in `origin` (wherever that lives)?
The two mistaken scenarios I run into the most are:
1. `git pull` when I'm not in the right branch, which will want to do a merge.
2. When I have commit access on the master branch, and I do a `git merge branch` when that branch hasn't been properly rebased on master. My preference is no merge commit here, so I like that Git can catch this.