M
M
Maxim Ivanov2017-02-27 13:50:29
git
Maxim Ivanov, 2017-02-27 13:50:29

How to merge branches into one commit?

The merger seems to be clear:

$ git checkout master
Switched to branch 'master'
$ git merge test

But what if I made a lot of commits to the test branch and when merging, all these commits are copied to master. How to make the merge be like a single committed commit to the master branch so that it can be easily rolled back later?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lynn "Coffee Man", 2017-02-27
@splincodewd

git merge --help
You need either --no-ff or --squash

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question