From: Johannes Schneider <mailings@cedarsoft.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: Commit to other branch
Date: Mon, 31 May 2010 17:46:09 +0200 [thread overview]
Message-ID: <4C03D9C1.1060404@cedarsoft.com> (raw)
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
next reply other threads:[~2010-05-31 16:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-31 15:46 Johannes Schneider [this message]
2010-05-31 16:28 ` Commit to other branch Matthieu Moy
2010-05-31 23:50 ` Jeff King
2010-06-06 18:43 ` Jan Hudec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C03D9C1.1060404@cedarsoft.com \
--to=mailings@cedarsoft.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.