git 将a分支合并到b中

已知分支a,b
需要a merge to b

  • 1. git fetch

  (current branch: b分支)

  • 2. git merge origin a分支
  • 3. git push

 

git merge后,想要取消合并

git reset --hard HEAD


git merge后,想要取消commit(merge的local commit)

git reset --soft HEAD~1

  

其它:查看当前提交时的用户名/邮箱

 

git config user.name

git config user.email

 

 

posted @ 2023-02-27 08:30  人间春风意  阅读(280)  评论(0)    收藏  举报