DEV Community

Discussion on: What dev topic do you think you should understand, but don't?

Collapse
wuz profile image
Conlin Durbin Author

This is a big challenge! It takes a while to navigate git un-destructively! There are some good resources out there, but the gist, at least of how I use git, is:

  1. Avoid push -f, it's dangerous!
  2. Prefer merge over rebase - this adds a lot of merge commits, but it makes working collaboratively much easier
  3. Rebase master onto your branch early and often.

I'd love to know if you have any specific cases where your code gets clobbered by git. I run into them every now and then, but for the most part I manage to avoid it!

Collapse
dfockler profile image
Dan Fockler

I think rebasing always feels painfully awkward and my brain doesn't quite understand what git is trying to do. Like having to fix the same conflicts over and over. Especially when you have multiple people working on the same branches or base branches it gets to be overwhelming fast.