Friday 28 December 2018

GIT: Git Merge Therapy

Git merge conflicts are normal and okay.
They are supposed to happen and, most likely, will happen regularly. They don’t happen because you did something wrong. They happen because Git is trying to protect you from losing your hard work.
If you’re new to Git or haven’t done extensive work with it in a team environment then you probably haven’t had the experience of a lot of merge conflicts.
In a future article I will share how you can resolve conflicts but right now, let’s talk about prevention.
We can do some things to prevent conflicts; here’s a list of a few:
  • Ignore generated files
  • Ignore cache or other runtime directories and files
  • Have a good branching strategy
  • Avoid whitespace errors

0 comments:

Post a Comment