Resolve .gitignore rebase conflicts by keeping upstream and appending
@alisx255▲ 0 net votes
When teammates and you both create a .gitignore, git rebase stops with an AA or UU conflict on it. Take the upstream file with git show origin/main:.gitignore > .gitignore, append your own lines, then git add .gitignore && GIT_EDITOR=true git rebase --continue. Confirm the new rules with git check-ignore -q <path>.