8

Spent two hours explaining to an intern the basics of version control and why you must always commit and pull before you push. He claims he understood how it worked. I come back the next day only to see my code was overwritten because he pushed and never pulled.. I get yelled at by my boss because he can't see the changes I made and assumes I was slacking off the previous day :/

Comments
  • 7
    Then show him the commits, it's called version control for a reason. Don't blame a junior for not understanding it right away
  • 0
    If it's on github you can protect branches
  • 1
    So he force pushed?
  • 2
    When I teach people on how to use git I set up a separate repo where we can mess around a bit...
    So first things first I teach them how to push/pull/commit/branch etc. and last thing we do is overwriting each other's commits before I ask them to fix the merging issues. That usually helps because if you've ever had to manually merge from two different versions I guarantee you won't do it twice!
  • 6
    How did an intern with zero git experience get write access to a repo on the first day?
  • 2
    For each task or module create a new branch. Nobody messes with anybody's code.
  • 1
    Or create a new branch just for that developer (not a good approach as prvious that I mentioned)
Add Comment