git-gui - 如何删除git上的一条基线
某草草
某草草 2017-05-02 09:51:14
0
2
1083

如图所示,是sourcetree中的一条基线,这一整条上的基线代码是我误操作搞出来的,请问如何删除这一条基线

某草草
某草草

reply all(2)
Ty80

Looks like a mistake because your adjacent commits are all the same.

If you want to restore, first you need to go back to before merge commit, that is, 18c7602 之前。另一方面,你在 merge commit 之后还有提交,所以直接用 git revert should be able to solve it.

git revert 18c7602 -m 1

Try it. If something goes wrong, you can use the reflog function to undo the local operation. It should be safe


In brief explanation, -m 1 的意思就是,选取 18c7602 之前的一个 commit(也就是你截图中的 2bb3800) serves as parent. In this commit, the content in the purple branch cannot be read. So I think it should be possible to do this

世界只因有你

Delete the branch and it will be gone

git branch -d branchname
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template