Aada
Aada

Reputation: 1640

How to copy commits from one branch to master branch?

I am using Android studio and commandline both. I have a feature branch that has become a superset of my master branch.

I want to merge all diff commits from this feature branch to master branch. How this can be done.

Upvotes: 0

Views: 693

Answers (2)

Alaindeseine
Alaindeseine

Reputation: 4423

You can do this :

git checkout master
git merge --no-ff feature-branch

Upvotes: 1

Shlomi Katriel
Shlomi Katriel

Reputation: 2403

Use cherry pick: https://www.jetbrains.com/help/idea/apply-changes-from-one-branch-to-another.html#cherry-pick

This way you can checkout master, then apply (cherry pick) specific commit from other branch (your feature branch).

Enjoy 🙂

Upvotes: 0

Related Questions