4 ms·
This command has a mistake in it: ours = "!f() { git commit --ours $@ && git add $@; }; f" it should be ours = "!f() { git checkout --ours $@ && git
by darrickwiebe 13y ago
This command has a mistake in it:
ours = "!f() { git commit --ours $@ && git add $@; }; f"
it should be
ours = "!f() { git checkout --ours $@ && git add $@; }; f"
- philjackson 13y agoThanks, I've used an alias for checkout, "co", which I wrongly expanded when I wrote up the article. I've corrected it. Proofreading is another way not to get fired.
- alekseyk 13y agoLooks like your probation period is over.
- joe8756438 13y agoHas anyone ever gotten fired for making a git or other version control "mistake?" https://news.ycombinator.com/item?id=5513353 https://news.ycombinator.com/item?id=5513353
- joelhooks 13y agoMost certainly. I've witnessed it. It was a really bad mistake though.
- masklinn 13y agoShouldn't the $@ also be quoted? If one of the argument is a quoted file path with a space, the unquoted form is going to see multiple paths.
- aiiane 13y agoAlso note that the 'git add' here is actually completely redundant - 'git checkout <filename>' automatically updates the index with the checked-out version of the file, in addition to the working tree.