Quantcast
Channel: User spraff - Stack Overflow
Viewing all articles
Browse latest Browse all 55

Ignore changes to .gitignored files which were force-added

$
0
0

I want to add a certain file to my git repository, but ignore any subsequent changes.

In my .gitignore I have

path/to/ignored_files

And I had to

$> git add -f path/to/ignored_files/foo

to add these files.

(They were added in their correct initial state, but get overwritten as the application runs and I do not want those changes to be committed.)

Now these files show up in git status even though they are ignored.

Can I have them ignored going forwards, now that they exist and have changed?


Viewing all articles
Browse latest Browse all 55

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>