Commit to other branch
- From
- Johannes Schneider <mailings@cedarsoft.com>
- Date
- May 31, 2010, 15:46 UTC
- Message-ID
- <4C03D9C1.1060404@cedarsoft.com>
Hi guys,
I often run in that scenario: I see a small bugfix/typo/missing documentation. Of course I just add a bit of code to fix that issue... Then I'd like to commit that change as own commit. And most of the time this is possible without any problems (git commit <file>). But as I am *always* working on a topic branch, it takes some work to commit that change to another branch.
I tried to "git stash " But then *all* changes are stashed (including my changes)...
So at the moment I do that:
git commit <file> (on wrong branch) git stash git checkout pu git cherry-pick git checkout my-topic git reset --hard git stash apply
And that is much to much work. I just want to do something like that:
git commit <file> -b pu
But I don't think that is possible at the moment... Any hints, how I could solve that? How do you do that?
Thanks,
Johannes
-- Johannes Schneider - blog.cedarsoft.com