M
M
Maxim2018-07-02 20:54:03
git
Maxim, 2018-07-02 20:54:03

How to merge branches in git at specific commits?

Hello!
There are 2 branches: master and dev. Each branch has its own server (master and dev), the repository is on Gitlab. Until the commits in the dev branch are checked out, they are not merged into master. Each commit is a separate task. However, in dev, commits out of order may be checked out.
There are 2 commits in master, let's call them c1 and c2. There are 5 commits in the dev branch: c1, c2, c3, c4, c5. How can I merge into master, only commits c3 and c4? The c5 commit remains, only in dev. Is it enough to use git cherry-pick for this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Movchan, 2018-07-02
@Alexander1705

git merge c4

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question