I cannot do the correct merge of branches in git. For example, I have two branches:
C - D - E my_branch / A - B - F - G - K *master
Now I am on the host. After "git merge my_branch", I received several of these from the master:
A - B - C - D - F - G - K - E - M *master
(M-merge commit) But I also do this:
A - B - F - G - K - M
This is important because on my_branch I often do not compile commits, only for myself; and I don’t want to push them into the master. How to make the merge I want?
, , , - , , . , " " git; .
: , , git , , , . , , "".
, , git merge --squash ( git commit). :
git merge --squash
git commit
, , ( git rebase -i master), , , , git merge, . , :
git rebase -i master
git merge
A - B - F - G - K - M1 - M2 - M3
M1, M2 M3 - , . , , , .
M1
M2
M3
--squash git merge: , .
--squash
Source: https://habr.com/ru/post/1772469/More articles:Perl: fetch lines 1 to n (Windows) - perlтип контента для установки BlackBerry OTA - blackberryNSLayoutManager setAllowsNonContiguousLayout moves carriage - cocoaPHP + FTP deletes files in a folder - phpBlackberry OTA-загрузчик с использованием сервлетов - javaimplementation of parser with shift reduction in java - javaКак я могу динамически создавать столбцы в SQL select statement - sqlAJAX reads data in a progressive way, not only after it is completed - javascriptOpening transparent / conversational activity on top of other activity - androidTo have an inclusive background for android activity? - androidAll Articles