Loading

Renaming and Removing files

Renaming and Removing files

To rename a file in the index and the working directory:

$ git mv README readme
$ git ls-files
readme
$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD ..." to unstage)
#
# renamed: README -> readme
#

And to remove a file from the working directory and the index:

$ rm README
$ git rm README


posted @ 2012-04-01 16:51  .net's  阅读(408)  评论(0)    收藏  举报