简体   繁体   中英

Is there a way to merge two local branches together in Intellij

I have checked out a branch from remote->develop twice with names dev and develop. These dev and develop are my local branches. I have made changes in both. Now i need to merge them both as a single local branch so that both changes are present in a single branch. Is there a way to do that?

Go to:

  1. Be sure to be in the master branch
  2. Version Control tab
  3. Double-click on the last commit
  4. Hover the option "Branch 'branch-name'"
  5. Click on "Merge into current"

You can follow the following commands if you want to use the commands.

git checkout master Switched to branch "master"

git merge dev To merge the new feature in the "dev" branch into the "master" branch

git merge develop To merge the new feature in the "develop" branch into the "master" branch

At the end, the branch "master" will contain all the features in both "dev" and "develop" branches.

Be aware that conflicts may occur.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM