Reputation: 473
I have a git repository on my NAS. I use from Windows and Linux SmartGit/Hg for interface with it.
I had to took some old repository make in TFS and convert into GIT one, so far so good (difficult procedure but I had success). For the new project I can tell GIT (before the first "commit") which directory I want to exclude, however the converted repository automatically put in git some directory that heritace from TFS. I suppose that TFS also had all the change of this directory.
So I thought that I can tell to GIT to ignore this directory but from SmartGit/Hg seems that if a directory/file is committed once I can't put it into ignore directory, so how can I tell to git to ignore for the future that directory?
Upvotes: 1
Views: 118
Reputation: 31
You can use a gitignore file. Here you can define which directories and files will not commited.
Click on the link below: https://help.github.com/articles/ignoring-files/
Kevin
Upvotes: 0
Reputation: 1324827
You need to remove that folder from your index (but not from your disk):
git rm --cached -r yourFolder
(See "gitignore
after commit" and "How to remove a directory in my GitHub repository?")
Then the .gitignore
will be able to ignore the folder.
yourFolder/
Upvotes: 2