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

Re: little conundrum

From
Alan Chandler <alan@chandlerfamily.org.uk>
Date
Nov 3, 2005, 22:02 UTC
Message-ID
<200511032202.18900.alan@chandlerfamily.org.uk>
In-Reply-To
<Pine.LNX.4.63.0511031845410.3435@wbgn013.biozentrum.uni-wuerzburg.de>
On Thursday 03 Nov 2005 17:47, Johannes Schindelin wrote:
Show 20 quoted lines
> Hi,
>
> On Thu, 3 Nov 2005, Alan Chandler wrote:
> > I would like to make myself a git repository that contains at the start,
> > an initial commit of the original downloaded source code, and a second
> > commit on the top of that that contains the the current state of play
> > after the changes I have made.
>
> How about this:
>
> 	cd orig/
> 	git-init-db
> 	git-add $(find * -type f)
> 	git-commit -m "initial"
> 	cd ../modified
> 	mv ../orig/.git ./
> 	git-add $(find * -type f)
> 	git-commit -a -m "my modifications"
>
> Of course -- in the great tradition of this list -- totally untested.

Also untested, but what about removing the files from the index that aren't in the working directory?

-- 
Alan Chandler
http://www.chandlerfamily.org.uk
Open Source. It's the difference between trust and antitrust.
Previous: Peter EriksenNext: Johannes Schindelin
Message 4 of 12 in “little conundrum”
  1. Alan ChandlerNov 3, 2005
  2. Johannes SchindelinNov 3, 2005
  3. Peter EriksenNov 3, 2005
  4. Alan ChandlerNov 3, 2005
  5. Johannes SchindelinNov 4, 2005
  6. Peter EriksenNov 3, 2005
  7. Alan ChandlerNov 3, 2005
  8. Peter EriksenNov 3, 2005
  9. Alan ChandlerNov 3, 2005
  10. Peter EriksenNov 3, 2005
  11. Petr BaudisNov 3, 2005
  12. Alan ChandlerNov 3, 2005

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.