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.

  • Git Push to Amazon S3 for Deploying Assets?
  • How do I convert an svn repo to git using reposurgeon?
  • Git - Github push history
  • .gitignore not ignoring folder
  • How best to squash old commits
  • Remove 4 commits from my git history
  • How to clone from a github repo and then run npm install on puppet
  • convert exsisting git repository to git-lfs
  • Determining how cvs2git converted CVS trees
  • How could I find out which branch is checked out on a remote machine?
  • Git fails to push to ftp-server
  • Is it possible to make git clone recursive by default?
  • 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 --no-assume-unchaged flag

    git update-index --no-assume-unchanged  <filename>

    But these command do not affect the remote repository.

    Even simpler:

    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 .gitignore file.

    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/

    Git Baby is a git and github fan, let's start git clone.