git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Commit to other branch

From
JHJan Hudec <bulb@ucw.cz>
Date
Jun 6, 2010, 18:43 UTC
Message-ID
<20100606184334.GB30035@efreet.light.src>
In-Reply-To
<4C03D9C1.1060404@cedarsoft.com>
On Mon, May 31, 2010 at 17:46:09 +0200, Johannes Schneider wrote:
Show 7 quoted lines
> 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.

What I'd probably do is just commit the quick fix, as separate commit, where I am. Than when I'd have a bit of time (probably when I'd otherwise think of rebasing on master anyway) I'd rebase -i all such fixes to the bottom of the topic branch, go to master and merge just those fixes. The rebase -i can be against current master, so the merge back would be fast-forward, of course.

-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
Previous: Jeff King
Message 4 of 4 in “Commit to other branch”
  1. Johannes SchneiderMay 31, 2010
  2. Matthieu MoyMay 31, 2010
  3. Jeff KingMay 31, 2010
  4. Jan HudecJun 6, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.