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

Like commit -a, but...

From
Andreas Krey <a.krey@gmx.de>
Date
Nov 5, 2012, 20:29 UTC
Message-ID
<20121105202948.GA17505@inner.h.apk.li>
Hi all,
I have a workflow for which I can't quite find the git tooling.

Essentially what I want is like 'git commit -a', except that I want the resulting commit on a branch I name instead of the current one, and I want my current index not being modified. At the moment I emulate that via

  git commit -a -m TEMP": `date` $*" && \
  git push -f nsd master:temp && \
  git reset HEAD^ && \

but that a) changes the index (ok, not that bad), and it will change my current commit in the case that there are no unmodified files (no commit -> head doesn't point where I want). Ok, that can be prevented by --allow-empty.

But still I'd like to know if there is a cleaner solution, esp. with respect to the index.

(Ah, the point of all this is to take the exact current worktree and push it to a compile&deploy server; I don't want to chop my work into commits before I even could compile it.)

Andreas
-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800
Next: Andreas Krey
Message 1 of 4 in “Like commit -a, but...”
  1. Andreas KreyNov 5, 2012
  2. Andreas KreyNov 5, 2012
  3. Tomas CarneckyNov 5, 2012
  4. Andreas SchwabNov 5, 2012

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.