In git, I ignored locally file using .git/info/exclude, based on answer to question. But now I can not pull from remote, this is the error that I am getting:
git pull
error: Your local changes to the following files would be overwritten by
merge: ignoredFile
Please commit your changes or stash them before you merge.
So I tried commit this file:
git commit -am "Message"
On branch master
Your branch is behind 'origin/master' by 4 commits, and can be fast-
forwarded.
(use "git pull" to update your local branch)
nothing to commit, working tree clean
So question is as in title, how to keep repository updated (git pull), while ignoring particular files locally.
EDIT: I ran commend:
git update-index --assume-unchanged ignoredFile
Before git pull.
EDIT2:
git pull --rebase
error: Your local changes to the following files would be overwritten by merge:
ignoredFile
Please commit your changes or stash them before you merge.
Aborting
Updating 0f37f00b..5ccc1b0a
First, rewinding head to replay your work on top of it...
error: Your local changes to the following files would be overwritten by checkout:
ignoredFile
Please commit your changes or stash them before you switch branches.
Aborting could not detach HEAD