Overwrite uninstalled entries due to gitattributes eol settings

I have a fork that has automatic eol changes when cloning due to .gitattributes. This is fixed in the upstream. I would like to unite upstream in my master; however, I cannot get rid of these unspecified changes. I cannot reset, and I cannot hide them if I have something missing. How to combine upstream / downstream in master, overwriting these local undefined "changes"?

+3
source share
1 answer

Firstly, you can try

git reset --hard

to get rid of any changes to the working directory and index. You should now be able to

git merge --ff-only upstream/branchname

If for some reason the git attributes make it seem like there are changes, and that won't work, try

git push . upstream/yourbranch:yourbranch

If this works, you should be in a headless state. IE, your current commit is not tracked by any branch.

git checkout yourbranch
Now

should go to updated. If the attributes are still causing grief, add an option --forceto the checkout.

Hope this helps

0
source

All Articles