DEV Community

Discussion on: Master Git in 7 minutes

Collapse
 
safinghoghabori profile image
Safin Ghoghabori

I think it wont remove from remote repo but staging area.

Collapse
 
valeriavg profile image
Valeria

Git rm is the exact opposite of add.
So if you *add*ed files and then called git rm --cached smth it will remove that something from the staged changes. If you didn't change or add anything since the last commit, calling git rm will create this change (as if you would delete the file), staging it for your next commit.