相关疑难解决方法(0)

似乎无法放弃Git的变化

从命令行看到以下内容后:

# On branch RB_3.0.10
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   index.htm
Run Code Online (Sandbox Code Playgroud)

我试图通过键入命令来放弃我的更改:

git checkout -- index.htm
Run Code Online (Sandbox Code Playgroud)

但是当我重新运行git status时,它看起来完全一样.结帐似乎不起作用.难道我做错了什么?我在windows/cygwin上使用GIT 1.6.1.2.

# On branch RB_3.0.10
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified: …
Run Code Online (Sandbox Code Playgroud)

git revert

115
推荐指数
7
解决办法
5万
查看次数

标签 统计

git ×1

revert ×1