Reputation: 105
I have two projects with similar code base. I work on new features on both repositories and I make some changes on both, that should not be shared to the other. I want to use branches in git, to make sure I can always merge the new features from one to another.
In projectA I create a feature branch from projectA/master
, make few commits and merge them to projectA/master
. In projectB I tried to merge projectA/feature-branch
to projectB/master
, but the projectA specific clutter would be merged as well.
It is possible to view all commits of the specific branch with
git show projectA/master..projectA/feature-branch
And I’d like to have something similar for merging
git merge --no-ff projectA/master..projectA/feature-branch
so that only the commits, directly committed to the feature-branch
will be merged. Is this possible somehow?
Upvotes: 0
Views: 119
Reputation: 156
Maybe you are looking for cherry pick.
Git reference:
https://git-scm.com/docs/git-cherry-pick
And you can see this article:
https://ariejan.net/2010/06/10/cherry-picking-specific-commits-from-another-branch/
I'd like to use a graphical tool like Git extensions for this, but it just up to you. I hope you find it useful (:
Upvotes: 1