11

I added to my repository files that I don't want to track now. I don't want them to appear in this pending files window but I don't wont to delete them from the project. The problem is that I don't know how to fix it. I tried everything. I even deleted them from repository(but not from the project so they were still on my disk) but after it they appeared in deleted files. It is really annoying. So how to get rid of this /target/ files.

Warning: Stop tracking option dosen't work! There is no reaction on it.

enter image description here

Przemek
  • 647
  • 2
  • 8
  • 25
  • Possible duplicate of [How do I stop Git from tracking any changes to a file from this commit forward?](http://stackoverflow.com/questions/18276951/how-do-i-stop-git-from-tracking-any-changes-to-a-file-from-this-commit-forward) – BJ Myers Aug 29 '16 at 05:00

2 Answers2

12

Here is an answer in Atlassian answers

It is said there that: The issue seems to be that the cancel and Okay button functionality is switched up for that option. Hitting cancel actually made it stop tracking the file(s).

It worked for me also. Version 1.9.6.1

shda
  • 729
  • 7
  • 19
4

Here is simple solution ,Add the file name or folder with to your .gitignore,then git will ignore it on source change.

filename_with_path or folder

and you can use git rm -r filename/folder* to ignore it for ever

Mohamed Nizar
  • 780
  • 9
  • 30
  • are using UI or gitbash? use this commands on gitbash "git clean -f" will remove the untracked files from your source tree! – Mohamed Nizar Aug 28 '16 at 11:23