S
S
Stas572016-09-23 23:21:34
git
Stas57, 2016-09-23 23:21:34

Git how to "collapse" commits?

Good day to all.
I'm learning git.
The essence of the question is this.
there are 2 branches. master and dev
in the master is the stable version. dev is under active development.
periodically dev merges into master.
The question is: how to merge dev into master without the entire commit history?
Or maybe the development process is not correct :) then tell me what's wrong
thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xtala zen, 2016-09-23
@xtala

Collapsing commits is done using interactive mode git rebase -iand the option --squashis translated as a pumpkin (which is symbolic =) ).
You can also follow the method from the habrostia:

git merge feature --squash will merge the changes from all commits on the feature branch, push them to the master branch, and add them to the index. This will not create a merge commit, you will need to make it manually.
The same behavior without the squash option can be achieved by passing the --no-commit option when merging.

https://habrahabr.ru/post/195674/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question