I'm pulling a branch into master
in order to merge it.
Command I'm running is (while having master
checked out): git pull origin feature/some_branch
Unfortunately it seems my colleagues have performed some (what I would think benign) file deletions on there, and now git spews out a error: unable to unlink old 'somefile': No such file or directory
.
I've tried to look online but most of the references for this error concern permissions, which is not the case here.
The file in question is not present on master before the merge, while is it in the new branch.
The problem is that master
wasn't updated in a long time so there are way too many changes and files affected for me to start figuring the code out.
I just need master
to contain all the changes that came from the new branch. We never commit anything to master
directly, always through merges.
What I've tried so far:
- Using
--force
parameter, same issue git reset origin/master --hard
and running thepull
again, same issue
How can I update master
with another, more recent branch without caring for such issues, and while keeping its history?
git merge
with master before trying to pull in the changes from your feature branch? – Erhartmaster
that you want to preserve, or is it okay to completely overwrite yourmaster
with the version inorigin/master
? – Handcuffmaster
is free from any commits, we never commit to it directly... only through merges. And yes, free to completely overwrite from origin – Nonillion