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

Mick MacCallum
  • 129,200
  • 40
  • 280
  • 281
VextoR
  • 5,087
  • 22
  • 74
  • 109

1 Answers1

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'")

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250