Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-repository cherry-pick #68

Open
danpoltawski opened this issue Nov 18, 2013 · 2 comments
Open

Cross-repository cherry-pick #68

danpoltawski opened this issue Nov 18, 2013 · 2 comments

Comments

@danpoltawski
Copy link
Contributor

This is a similar feature to mdk backport, but I want it less magic, because that does a lot more than I want.

A common scenario is that I want to cherry-pick a commit from one repository to another. Usuually how I do this manually is:

1/ in repoA find the right commit git format-patch -n1 <hash> into /tmp/
2/ In repoB git am /tmp/patch
3/ Get slightly annoyed with all the fiddling

What i'd like is to just do mdk cherry-pick repoA <hash>

There are a few different ways you could do this under the hood.

@danpoltawski
Copy link
Contributor Author

(Btw the reason I use /tmp is just that I get annoyed finding the path to the other repo)

@danpoltawski
Copy link
Contributor Author

I added a git alias to do this:

mdk-pick = "!sh -c 'git fetch `mdk info -v path $1` HEAD && git cherry-pick $2' -"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant