Skip to content

Instantly share code, notes, and snippets.

@aruprakshit
Created November 4, 2015 09:25
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save aruprakshit/f89f15e9be8f3bd41c1b to your computer and use it in GitHub Desktop.
How to untrack a already tracked file in Git ?
[arup@TeraDial (issue_40)]$ gvim
[arup@TeraDial (issue_40)]$ git status
# On branch issue_40
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: .gitignore
# modified: Gemfile
# modified: config/database.yml
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .ruby-gemset
# config/database.yml.example
no changes added to commit (use "git add" and/or "git commit -a")
[arup@TeraDial (issue_40)]$
@aruprakshit
Copy link
Author

Use the command

git rm --cached config/database.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment