Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bring only one specific folder and file from one branch to another branch, is it possible?

Shyam February 21, 2022

we have created feature branch it has 10 files and 1 folder.
and we have created one test branch and which is empty, now I want to bring only that one folder from feature branch to this test branch
is it possible? If yes please tell me how we can achieve this?

Please help 

1 answer

0 votes
Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 23, 2022

Hi, @Shyam, thank you for reaching out to Atlassian Community.

If you don’t want to merge the entire feature branch to your test branch, I recommend that you use the git cherry-pick command. This is the act of picking a commit from a branch and applying it to another.

In this case, you could run the command git log to find those commits and cherry-pick them to your test branch. After you find the commits you want, you can run the following command to add them to your test branch:

git cherry-pick {commitSha}

You can find more details about git cherry-pick in our Git tutorial here:

Feel free to share any additional questions or concerns regarding this case.

Kind regards,
Caroline 

Shyam February 27, 2022

Hi Carlone,

Thank you for the response.

 

Can u please assist on below query also 

https://community.atlassian.com/t5/Bitbucket-questions/I-am-not-able-to-push-to-remote-repo/qaq-p/1946015#M78362

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events