0 votes
1 view
in Devops and Agile by (20k points)

I have forked a branch from a repository in GitHub and committed something specific to me. Now I found the original repository had a good feature which was at HEAD.

I want to merge it only without previous commits. What should I do? I know how to merge all commits:

git branch -b a-good-feature

git pull repository master

git checkout master

git merge a-good-feature

git commit -a

git push

1 Answer

0 votes
by (28.4k points)

Use the following command to apply a single commit by itself to your current branch.

$ git cherry-pick XXXXXXXX

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...