Learntofish's Blog

A blog about math, physics and computer science

Posts Tagged ‘egit’

Untrack files in git

Posted by Ed on September 23, 2018

Files in git can either be

1. tracked
2. untracked.

Tracked means the file has been committed and is known to git. A file is untracked if git sees it for the first time.

In Egit (Git for the Eclipse IDE) the status of a file is shown with different icons.

Now, suppose you committed a file, but you later realize that you shouldn’t have done it, and that instead you want to ignore the file (by adding it to the gitignore file).

In git you cannot ignore a file that has been tracked. You first have to untrack it.

Once the file has been untracked you can then ignore it.

References

Pro Git book, written by Scott Chacon and Ben Straub.

Icons in Egit (Git for Eclipse) show status of file.

Posted in programming | Tagged: , | Leave a Comment »