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

Re: [PATCH 1/2] init: support --import to add all files and commit right after init

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 28, 2009, 12:39 UTC
Message-ID
<alpine.DEB.1.00.0903281334490.12669@intel-tinevez-2-302>
In-Reply-To
<200903281158.51012.markus.heidelberg@web.de>
Hi,
On Sat, 28 Mar 2009, Markus Heidelberg wrote:
Show 7 quoted lines
> Johannes Schindelin, 27.03.2009:
> > Others who want to have a quick way to work safely with something they 
> > might need to change, and might then want to use the full power of Git 
> > to see what they changed.  Without any need for a "nice" first commit.
> 
> What's the difference between the first commit and the others? I don't 
> see the reason, not to have a short description for it.
Maybe you can learn a new trick here:

$ tar xf /some/random/project.tar $ git init $ git add . $ git commit -m initial

and now one of two work flows:

# get the thing to work properly, or add a new feature, or clean up... $ git diff > diff.patch # send the diff to the maintainer, without ever committing

or

# make a patch series, use rebase -i to clean up after it # send the patch series to the maintainer of the random project

See?  The initial commit does not matter at all.

I do this so often that it stops being funny having to type three commands.

And having to edit a commit message I do not care about anyway everytime, just to please you, would not make it any funnier ;-)

I'll just repeat one of my favorite mantras: optimize for the common case, not for the uncommon case.

Ciao, Dscho

Previous: Markus HeidelbergNext: Markus Heidelberg
Message 13 of 14 in “init: support --import to add all files and commit right after init”
  1. 1/2 init: support --import to add all files and commit right after initNguyễn Thái Ngọc Duy, Mar 25, 2009
  2. Jeff KingMar 25, 2009
  3. Nguyen Thai Ngoc DuyMar 25, 2009
  4. Santi BéjarMar 25, 2009
  5. Johannes SchindelinMar 25, 2009
  6. Jeff KingMar 25, 2009
  7. Santi BéjarMar 25, 2009
  8. Markus HeidelbergMar 26, 2009
  9. Johannes SchindelinMar 27, 2009
  10. Jeff KingMar 27, 2009
  11. Jeff KingMar 27, 2009
  12. Markus HeidelbergMar 28, 2009
  13. Johannes SchindelinMar 28, 2009
  14. Markus HeidelbergMar 28, 2009

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.