git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Switching branch before commit
@ 2007-05-10 19:43 Ron Parker
  2007-05-10 20:02 ` Adam Roben
  2007-05-10 20:08 ` Junio C Hamano
  0 siblings, 2 replies; 3+ messages in thread
From: Ron Parker @ 2007-05-10 19:43 UTC (permalink / raw)
  To: git

I know this is probably a FAQ and I thought I found it somewhere once,
but... How do I commit changes from in my working directory to another
(possibly non-existent) branch?
 
All too often I am working on changes and realize I am sitting on master
or a topic branch and I need to commit my mods to different branch.  I
really don't like:
 
    git commit
    git branch <other-branch>
    git reset --hard HEAD^
 
Is there anything like:
    git commit -b <other-branch> [<file>...]?

If not, would patches to implement such a change be accepted?

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

end of thread, other threads:[~2007-05-10 20:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-10 19:43 Switching branch before commit Ron Parker
2007-05-10 20:02 ` Adam Roben
2007-05-10 20:08 ` Junio C Hamano

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).