Git is automatically merging changes from a different branch to master

前端 未结 3 536
梦如初夏
梦如初夏 2020-12-04 23:57

I am having an issue with Git branching. Whenever I make changes to a branch, all those changes get reflected in master branch even though I haven\'t invoked explicit merge

3条回答
  •  离开以前
    2020-12-05 00:43

    If you need to switch to master branch without commiting the current branch you can use git stash

    git stash # all changes will be queued
    git checkout master
    # do whatever you need in master
    git checkout dashboard
    git stash pop # get all changes queued back to branch
    

提交回复
热议问题