Snippet Yeah, kitt finished writing this at 18:40 on 22 November 2016
Add a file / directory to staging
git add filePath
Now, if you want to remove it from stage, but want to keep the changes you've made locally.
# unstage the file, remove it from the index, don't remove it from the working directory # a commit will remove it from the repo $ git rm --cached filePath # unstage a file, keep the local changes # YOU NORMALLY WANT THIS ONE $ git reset filePath