Git/rm: Difference between revisions

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< Git
Created page with "rm '''Action''': removes files from staging and, by default, also deletes them from the local project folder. To remove files ''only'' from the stag..."
 
how to update the remote afterwards
 
Line 2: Line 2:
'''Action''': removes files from staging and, by default, also deletes them from the local project folder.
'''Action''': removes files from staging and, by default, also deletes them from the local project folder.


To remove files ''only'' from the staging area, use <code>git rm --cached {{arg|file}}</code>.
To remove files ''only'' from the staging area, use <code>git rm --cached {{arg|file}}</code>. To update a remote project after doing this, do <code>git commit</code> and then <code>git push {{arg|remote}}</code>.
==Links==
==Links==
===Reference===
===Reference===
* [http://git-scm.com/docs/git-rm manpage @ git-scm]
* [http://git-scm.com/docs/git-rm manpage @ git-scm]

Latest revision as of 21:20, 9 March 2015

Action: removes files from staging and, by default, also deletes them from the local project folder.

To remove files only from the staging area, use git rm --cached <file>. To update a remote project after doing this, do git commit and then git push <remote>.

Reference