News for hackers. Stuff that matters.
Re:Git tips to stop you getting fired by darrickwiebe on Monday April 08, 2013 @10:34AM (#5511897)
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"
Re:Git tips to stop you getting fired by philjackson on Monday April 08, 2013 @10:41AM (#5511939)
Thanks, 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.
Re:Git tips to stop you getting fired by joe8756438 on Monday April 08, 2013 @02:00PM (#5513361)
Has anyone ever gotten fired for making a git or other version control "mistake?"

https://news.ycombinator.com/item?id=5513353

Re:Git tips to stop you getting fired by joelhooks on Tuesday April 09, 2013 @12:09AM (#5516397)
Most certainly. I've witnessed it. It was a really bad mistake though.
Re:Git tips to stop you getting fired by alekseyk on Monday April 08, 2013 @01:18PM (#5513034)
Looks like your probation period is over.
Re:Git tips to stop you getting fired by masklinn on Monday April 08, 2013 @12:03PM (#5512511)
Shouldn'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.
Re:Git tips to stop you getting fired by aiiane on Monday April 08, 2013 @09:22PM (#5515898)
Also 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.