How to get “their” changes in the middle of conflicting Git rebase?

I have conflicting branches, feature_x branched from main.

Let’s say when rebasing feature_x on current main, while resolving conflicts, I decide to take some (not all) of “their” (i.e. main) files as-is.
How do I do that?

I tried:

git checkout main:foo/bar.java
fatal: reference is not a tree: TS-modules-tmp:foo/bar.java
  
git checkout refs/heads/main:foo/bar.java
fatal: reference is not a tree: refs/heads/TS-modules-tmp:foo/bar.java

2 Answers
2

Leave a Comment