Untrack all files on git
In the move from C9 to hosting on my Macbook via SSH, I’ve had to re-download Kohana and change some other things just to get my site working; I don’t want those to be committed. Is there any way to untrack all tracked files so only future changes are committed? Or is there something else I should be doing?
I’m on a Macbook running Mountain Lion with Apache and PHP turned on.
3 Solutions collect form web for “Untrack all files on git”
git rm --cached File
Will delete the file in the index, so it will no longer be tracked, but won’t physically delete it. This will untrack the file only for current branch
Use this git command. After you do this, git stops checking the file for possible modifications.
git update-index --assume-unchanged <filename>
At any time, you can track again by setting
git update-index --no-assume-unchanged <filename>
But these command do not affect the remote repository.
cd /root/directory/of/your/local/repo git rm --cached -r .
Even even simpler:
git clone url/for/Kohana /different/local/path
I’m not exactly sure what you mean by “untrack all tracked files so only future changes are committed”. As you need to track files so they can be committed.
If all you just want to do is not track Kohana and the other downloads, then just remove them from your working directory using
git rm --cached <file> or even better create a
There are many helpful posts on stackoverflow to assist you with creating a
.gitignore file for your project. By using this, you can exclude an entire folder easily.
For Mac, it would also be helpful if you could see hidden file as the . file is hidden. This page shows you how to see hidden files on Mountain Loin – http://www.mikesel.info/show-hidden-files-mac-os-x-10-7-lion/