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.

  • TFS git commit change work item status
  • Is there a way to import/export SourceGear Vault to Git
  • Saving ssh key fails
  • How can I translate trunk/branch concepts from Subversion to Git?
  • Can I use git for assignment submission?
  • Importing commit history from Bitbucket to Github
  • Overcome git svn caveats
  • Add Github remote to GitKraken
  • docker autobuild with git private submodule
  • Completely remove files from Git repo and remote on GitHub
  • Is there any difference between `git merge origin master` and `git merge origin/master`?
  • Locking strategy of git to achieve concurrency?
  • 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

    [OR]

    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.