Home > Back-end >  Last commit pull to master branch git
Last commit pull to master branch git

Time:07-02

i just want to send the code of the last commit from developer to the master branch, please explain me how it works My structure is

origin
|
---developer
|    |
|     --- > start commit start.cpp
|     --- >commit 1
|     --- >commit 2
|     --- >commit 3
|     --- >commit 4
---master
     |  
     --- > start commit start.cpp

CodePudding user response:

You'd need to create a new branch from master, cherry-pick the one commit, and send that.

Or you could push up your dev branch and allow the other developer to cherry-pick the one commit.

CodePudding user response:

You can cherry-pick the last commit while master branch is checked-out.

git cherry-pick <last-commit-id>
  • Related