Answer the question
In order to leave comments, you need to log in
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
Collapsing commits is done using interactive mode git rebase -i
and the option --squash
is 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.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question