3

I have several files in my working directory which exist in remote rep and I always change them for specific reason.

Is it possible to make git to ignore those files while commiting, and same time those files should not be deleted from remote rep

And when I pull changes from remote rep those files should not be merged

Is it possible to do this?

P.S. git update-index --assume-unchanged doesn't help as git pull will try to merge files anyway

0

1 Answer 1

7

Since --assume-unchanged doesn't work, you can try (git update-index):

git update-index --skip-worktree -- afile

(as mentioned in "Git - Difference Between 'assume-unchanged' and 'skip-worktree'")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.