I cloned the remote repository which is having three files
file1.txt
file2.txt
file3.txt
changes are made locally in my machine into file3.txt. I don't want the changes to go into remote repo and vice versa.
I read that using .gitignore it is not possible to ignore the already commited and tracked file.
I decided to use .git/info/exclude file with the following line
exclude file
file3.txt
But still changes made in file3.txt are shown as unstaged file. I want this file3.txt to be ignored in commit and staging and also need to prevent file3.txt to update from remote repo
Thanks in advance for any help