Question

Assume that I have two branches as the following: the blue branch is a main develop branch and the yellow branch is a new-feature branch.

enter image description here

At some point, I know I have enough feature in my new-feature branch and I wish I could use them in the main develop branch. However, the new-feature is not quite done yet and I still want to keep working on it. Is there a way to push the modifications in the new feature branch to the main develop branch without merging them?

Is it a good practice to do so? Why or why not?

Était-ce utile?

La solution 2

Using git merger --no-ff <branch-name> should be the right way of doing it.

enter image description here

Autres conseils

Seems like you're mixing up terms here. Pushing and merging are different things in git. You might want to look at chery-picking. This will let you "cherry pick" specific commits into your branch. Might be from the dev to the master branch.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top