24
xonya
6y

I had a coworker that was a real asshole. I noticed that often, during git merges, he removed part of the code I wrote.
So I had to spend a lot of time copying and pasting my code from git history in order to restore it.
I complained about that but he answered it happened by mistake. In reality that happened so often that he had to done it deliberately.

Btw, I did a little revenge. One day I discovered he didn't feel very comfortable using recursion. Thereafter, every time I needed a small loop I created a recursive function doing the same thing.

Fortunately, after some months I found a better job. I hope he is still debugging that code.

Comments
  • 1
    Copying code from the history? I swear there's an easy command that does that automatically.
  • 1
    @iSwimInTheC I know basic git commands which can help like difftool or reset, but how do you manage a situation in which one randomly deletes some lines of code inside a big merge?
  • 5
    look up `git merge --yours` and `git merge --theirs`
  • 2
    @iSwimInTheC Ok, thanks for the hint. I've never used that.
Add Comment