在重复 pull/merge 次请求后修复存储库
Repair Repository after repeated pull/merge requests
我是git菜鸟...
我想恢复到 92e4013f73 并摆脱我通过多次 git 拉动所犯的所有错误。
* b9a908ea64 (origin/this_variable) Merge branch 'foo-bar:dev' into this_variable
|\
* \ 1a3611f735 Merge branch 'foo-bar:dev' into this_variable
|\ \
* \ \ e8044a33fa Merge branch 'foo-bar:dev' into this_variable
|\ \ \
* \ \ \ 6e9fe81632 Merge branch 'foo-bar:dev' into this_variable
|\ \ \ \
* \ \ \ \ e656766969 Merge branch 'foo-bar:dev' into this_variable
|\ \ \ \ \
* | | | | | d36c348ac4 (HEAD -> dev) Add this variable
| | | | | | * 3f0736c13b (origin/entity_id_template) Merge branch 'foo-bar:dev' into entity_id_template
| | | | | | |\
| | | | | | |/
| | | | | |/|
| | | | | * | 92e4013f73 (origin/save_persistent_states, origin/dev, origin/HEAD) Fix siren turn on parameter filtering (#52947)
| | | | | * | 6723942bf8 [ci skip] Translation update
如果您没有任何正在进行的工作,您只需将 this_variable
分支重置为 dev,然后从那里重试 work/merges。
同样,这假设:
- 您当前没有正在修改的文件(否则它们的本地修改将丢失)
- 你是唯一一个在
this_variable
上工作的人(允许你强制将其推回原点)
cd /path/to/repo
git switch this_variable
git reset --hard dev
git push --force
我是git菜鸟... 我想恢复到 92e4013f73 并摆脱我通过多次 git 拉动所犯的所有错误。
* b9a908ea64 (origin/this_variable) Merge branch 'foo-bar:dev' into this_variable
|\
* \ 1a3611f735 Merge branch 'foo-bar:dev' into this_variable
|\ \
* \ \ e8044a33fa Merge branch 'foo-bar:dev' into this_variable
|\ \ \
* \ \ \ 6e9fe81632 Merge branch 'foo-bar:dev' into this_variable
|\ \ \ \
* \ \ \ \ e656766969 Merge branch 'foo-bar:dev' into this_variable
|\ \ \ \ \
* | | | | | d36c348ac4 (HEAD -> dev) Add this variable
| | | | | | * 3f0736c13b (origin/entity_id_template) Merge branch 'foo-bar:dev' into entity_id_template
| | | | | | |\
| | | | | | |/
| | | | | |/|
| | | | | * | 92e4013f73 (origin/save_persistent_states, origin/dev, origin/HEAD) Fix siren turn on parameter filtering (#52947)
| | | | | * | 6723942bf8 [ci skip] Translation update
如果您没有任何正在进行的工作,您只需将 this_variable
分支重置为 dev,然后从那里重试 work/merges。
同样,这假设:
- 您当前没有正在修改的文件(否则它们的本地修改将丢失)
- 你是唯一一个在
this_variable
上工作的人(允许你强制将其推回原点)
cd /path/to/repo
git switch this_variable
git reset --hard dev
git push --force