Git Version Control Cookbook - Second Edition
by Kenneth Geisshirt, Emanuele Zattin(EUR), Aske Olsson, Rasmus Voss
There's more...
Although most branching scenarios expect you to completely merge branches, there are situations when, while working in a real environment, you only need to merge specific pieces of one branch into another branch. Using the --no-commit option, Git will make the merge and stop before committing, allowing you to modify and add files to the merge commit before committing.
For example, we have been working with projects where versions of strings have been updated in the feature branch but not in the master branch. So, an automatic merge into master would replace the current version string used on the master branch, which, in this case, was not the intention. In the following example, we will use a simple Git repository with a few ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access