I pulled latest remote master branch into my private branch but the automatic merge failed and there were conflicts I tried resolving them by accepting the changes from master branch with the command git checkout --theirs <filename>
but it is throwing an error : pathspec 'filename' did not match any file(s) known to git. How do I resolve this?
Asked
Active
Viewed 33 times
0

Abhist
- 43
- 1
- 6
-
What happens if you type `git fetch` and try again? – Huy Phạm Jul 28 '21 at 08:39
-
@HuyPhạm i won't be able to merge it into my private branch since there are conflicts. – Abhist Jul 28 '21 at 11:22
1 Answers
0
You should issue the command git status
to know the right relative path of each file to pass to the git checkout --theirs -- <FILE_NAMES_LIST>
.

Antonio Petricca
- 8,891
- 5
- 36
- 74
-
1Thanks @Antonio your suggestion worked there were discrepancies in file path. – Abhist Jul 28 '21 at 11:20