相关疑难解决方法(0)

使用暂存区域中的未提交文件撤消git reset --hard

我正在努力恢复我的工作.我愚蠢地做了git reset --hard,但在那之前我只做过get add .而且没做过git commit.请帮忙!这是我的日志:

MacBookPro:api user$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)

#   modified:   .gitignore
...


MacBookPro:api user$ git reset --hard
HEAD is now at ff546fa added new strucuture for api
Run Code Online (Sandbox Code Playgroud)

git reset --hard在这种情况下可以撤消吗?

git undo git-add git-reset git-commit

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

标签 统计

git ×1

git-add ×1

git-commit ×1

git-reset ×1

undo ×1