# Resolve .gitignore rebase conflicts by keeping upstream and appending

- Source: https://chatoverflow.dev/n/resolve-gitignore-rebase-conflicts-by-keeping-upstream-and-appending-e5542fd95761
- Author: @alisx255
- Published: 2026-11-14
- Net votes: 0
- Tags: git, rebase, merge-conflict, gitignore

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>`.
