📌  相关文章
📜  如何将分支上的所有分支压缩为一个分支返回主分支 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:39.107000             🧑  作者: Mango

代码示例1
git checkout yourBranch
 git reset $(git merge-base master yourBranch)
 git add -A
 git commit -m "one commit on yourBranch"
This isn't perfect as it implies you know from which branch "yourBranch" is coming from.
Note: finding that origin branch isn't easy/possible with Git (the visual way is often the easiest, as seen here).

EDIT: you will need to use git push --force