Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在分支 A 上做了三个提交
git checkout Branch B git merge --squash A git commit -m "B:merge A into B by squash"
如何检测分支 A 已被壁球合并到 B 中?
git-branch的--merged参数为您提供与特定分支或提交合并的分支列表。因此,您可以通过该命令进行检查:
git-branch
--merged
git branch --merged B
如果分支 A 在列表中,那么是的,它被合并到分支 B 中。