2015-12-17 21:40:38 +00:00
|
|
|
# git rm
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
> Remove files from repository index and local filesystem.
|
2019-01-30 11:19:23 +00:00
|
|
|
> Homepage: <https://git-scm.com/docs/git-rm>.
|
2015-12-17 21:40:38 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Remove file from repository index and filesystem:
|
2015-12-17 21:40:38 +00:00
|
|
|
|
|
|
|
`git rm {{file}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Remove directory:
|
2015-12-17 21:40:38 +00:00
|
|
|
|
|
|
|
`git rm -r {{directory}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Remove file from repository index but keep it untouched locally:
|
2015-12-17 21:40:38 +00:00
|
|
|
|
|
|
|
`git rm --cached {{file}}`
|