Resolving Git Merge Conflict

馋奶兔 提交于 2019-12-11 16:24:24

问题


Working in git with limited 8-10 years experience using CVS needing to understand what git repo is doing.

I created a branch off master with changes that I committed and then pushed back to master. Now in the same project I created another branch with a different change to one of the same files. As I go to create a Pull Request for my latest branch B it shows commits from Branch A. Also, my master shows commits from Branch A as though they still need to be pushed. I'd like Branch B to only include the changes I made since creating that branch. Then clear out the commits that are already in master showing they still need to be pushed. How do I do that? Please help.

I have tried

git checkout <branchA>

git rebase master

This was to get this branch to rebase seeing the commits were in this branch. Is there a way a git reset -soft <branchB> would remove the commits from BranchA?

来源:https://stackoverflow.com/questions/49618731/resolving-git-merge-conflict

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!