Git merge upstream: Prevent files to be deleted
Sometimes when merging upstream from a forked repo, you could have some conflict with files deleted from the origin but still useful for you.
The following command will explain how to prevent those files to be deleted from your fork during the merge of the upstream.
Retrieve data from upstream
git remote update
git merge upstream/origin
Remove modification done to altered file
git reset HEAD <file>
git co -f <file>
Then pursue merge process
Related protips:
Written by chuck
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Merge
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#