0

I've a situation where i want to define .gitignore file at user level. I would like to use both .gitignore repository as well as user level. Repository level is the same used by every one and user level is to add/remove files from tracking only for my machine.

We've a repository in which i work on a particular directory, so i want to push changes only for that directory. I don't want to accidently push changes for files outside that directory.

I'm looking solution for

  • Add/Remove files from tracking in user level .gitignore file?
  • In user level .gitignore, our path should be relative or absolute?
  • Is it possible to add a directory in .gitignore I only want to keep track?
Tarun
  • 1,888
  • 3
  • 18
  • 30
  • 2
    Possible duplicate of [Can I make a user-specific gitignore file?](http://stackoverflow.com/questions/5724455/can-i-make-a-user-specific-gitignore-file) – Tim Biegeleisen Dec 07 '16 at 01:30
  • Possible duplicate of [git track, ignore, delete, untrack](http://stackoverflow.com/questions/9785792/git-track-ignore-delete-untrack) – 1615903 Dec 07 '16 at 05:36

1 Answers1

0

I found solution, I was looking for

git update-index --assume-unchanged <filename>

For more information:

Already answered in stackoverflow

How to set GIT to ignore a few files

Community
  • 1
  • 1
Tarun
  • 1,888
  • 3
  • 18
  • 30