Commit to other branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]