Re:Things to commit just before leaving your job
by yarper on Wednesday August 19, 2015 @07:44AM
(#10084814)
We've got a guy in the office that merges the past over the present all the time. He's not quitting but I imagine if you were to try to break things this would be a good way to do it.
[ Parent
| on HN ]
Re:Things to commit just before leaving your job
by wil421 on Wednesday August 19, 2015 @07:54AM
(#10084853)
Got a offshore guy just like that. Constantly committing his whole project where most files are out of date and only the few he worked on are not.
There's no reason for him to commit javascript files he doesn't even work on the front end. It took me forever to figure out he wrote over my files the other day.
Re:Things to commit just before leaving your job
by escobar on Wednesday August 19, 2015 @08:19AM
(#10084942)
Sounds to me like he may not actually understand how git works, or he's following bizarre conventions that I've seen before from overseas devs I've worked with to just overwrite the entire project every commit
Re:Things to commit just before leaving your job
by cjrp on Wednesday August 19, 2015 @08:42AM
(#10085026)
He must be using push --force in that case.. which seems like a bad practise.
Re:Things to commit just before leaving your job
by yarper on Wednesday August 19, 2015 @11:36AM
(#10086220)
What they're doing is something like branching off a very old version of master, making changes to file A then trying to merge into the latest version of master, which already has a load of changes to file A. They then resolve the conflict by picking "ours", thus ignoring all changes on origin/master in favour of their own old version of master. This doesn't require a --force.
Re:Things to commit just before leaving your job
by cjrp on Wednesday August 19, 2015 @02:25PM
(#10087433)
Oh, that seems even worse!
Re:Things to commit just before leaving your job
by Kequc on Wednesday August 19, 2015 @09:16AM
(#10085166)
Sounds like one of those new git conventions that becomes hot every little while. Scripts are written that automate a 10 line git process which along the way gets mangled or copy-pasted wrong and you end up there.
Re:Things to commit just before leaving your job
by einarfd on Wednesday August 19, 2015 @08:25AM
(#10084966)
If he still does that after a stern talking to, you should take his commit privileges.
Re:Things to commit just before leaving your job
by mavelikara on Wednesday August 19, 2015 @08:02AM
(#10084880)
I am curious - wouldn't your Version Control system catch this and warn him that "file xyz has changed since you last checked it out, ..." etc?
Re:Things to commit just before leaving your job
by praseodym on Wednesday August 19, 2015 @08:12AM
(#10084918)
DVCS systems like Git and Mercurial will require you to merge, but if you use a GUI VCS frontend it's really easy to choose the "use my local stuff" button. Been there with some university projects groups. (These people also liked the "force push" method of merging.)
Re:Things to commit just before leaving your job
by jerven on Wednesday August 19, 2015 @08:31AM
(#10084992)
You turn this capability off. I did and I sleep much better since!
Re:Things to commit just before leaving your job
by shoo on Wednesday August 19, 2015 @08:13AM
(#10084921)
maybe it does, then he just hammers the "yeah yeah proceed" option to ignore that and make it hurry up and do the thing he wants it to do
Re:Things to commit just before leaving your job
by tedunangst on Wednesday August 19, 2015 @10:09AM
(#10085562)
There is no warning.
Pull
cp * ../work
cd ../work
Work
(cd ../src && pull)
cp * ../src
cd ../src
Commit
Re:Things to commit just before leaving your job
by jasonlotito on Wednesday August 19, 2015 @10:19AM
(#10085645)
Code reviews people! Proper code review system in place prevents this!
Re:Things to commit just before leaving your job
by brianwawok on Wednesday August 19, 2015 @10:35AM
(#10085757)
Why are you allowing "force" on the master branch? Don't do that!