android - 使用 repo 命令回滚?

标签 android git repository

当我使用 repo command 时如何回滚? ?

我对一些文件进行了一些更改,现在我想回滚到使用 repo sync 命令时下载的源。

我还没有提交更改。

最佳答案

正确的命令是:

如果您想恢复对工作副本所做的更改,请执行以下操作:
repo forall -c "git checkout."

如果您想恢复对索引所做的更改(即您已添加的更改),请执行以下操作:
repo forall -c "git reset"

如果你想恢复你已经提交的更改,请执行以下操作:
repo forall -c "git revert ..."

关于android - 使用 repo 命令回滚?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11152752/

相关文章:

git - 使用 git,如何将一些未提交的更改从一个分支移动到另一个文件夹中的另一个分支?

git subtree merge on the root of repository (with.git-flow)

php - 'git pull' 命令可以从终端运行,但不能通过 git 存储库 Hook 使用 php shell_exec()

Git用户权限

安卓游戏开发SDK?

android - android instrumentation 测试项目中的测试位置提供程序

android - 将 arraylist 值存储到不同的 textview

windows - Windows 命令行 merge 工具

java - 如何序列化自定义对象列表并在 Android 中的 RestoreInstanceState 上恢复它?

c# - 如何在存储库中正确处理 Linq to SQL DataContext?