git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Commit to other branch
@ 2010-05-31 15:46 Johannes Schneider
  2010-05-31 16:28 ` Matthieu Moy
  2010-06-06 18:43 ` Jan Hudec
  0 siblings, 2 replies; 4+ messages in thread
From: Johannes Schneider @ 2010-05-31 15:46 UTC (permalink / raw)
  To: Git Mailing List

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-06-06 18:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-31 15:46 Commit to other branch Johannes Schneider
2010-05-31 16:28 ` Matthieu Moy
2010-05-31 23:50   ` Jeff King
2010-06-06 18:43 ` Jan Hudec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).