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

Re: How to check out the repository at a particular point in time

From
RDR. Diez <rdiezmail-temp2@yahoo.de>
Date
Aug 23, 2011, 07:41 UTC
Message-ID
<1314085268.42103.YahooMailClassic@web25406.mail.ukl.yahoo.com>
Show 9 quoted lines
> "master" is nothing more than a pointer to a
> particular commit.  The commit has references
> to its parent(s), from which you can build a
> whole history.  In general, Git doesn't
> know the name of the branch a developer had
> checked out when a commit was created.
> In fact, in this example, both branches
> could have been called "master" if they
> lived in different developers' workspaces.
I understand. However, let's see if git can cope with this pretty common scenario:
Say I'm a developer with too many projects and little time. I don't really want to find the commit ID at each release and manually make a note on the project's web site. In fact, I have no "official" releases. The "contract" with my users (or co-developers in my team) is simple: check out HEAD, it should always work. If it doesn't, last week it worked well, check out at that point in time and wait until I fix the HEAD.
Now you're saying I cannot reliably checkout last week's versions because yesterday I did a merge from an older branch? You mean that git stores everything with clean graphs and numeric pointers, so it cannot know what this repository looked like last week?
As the developer, I have full control, I can decide what the branches are called and how the public repository is updated/pushed/whatever. I can control the clock so there are no time skews.
What do I have to do in order to be able to reliably checkout last week's versions without too much administrative work? I just want to get the same result today as if I had done a checkout last week from the public repository and had made a back-up copy of the working directory then.
With say CVS and Subversion, that's piece of cake, they already work that way, I don't need to manually keep track of revision IDs or visually inspect the merge tree.
Thanks for your answers,
  R. Diez
Next: Thomas Rast
Message 1 of 4 in “Re: How to check out the repository at a particular point in time”
  1. R. DiezAug 23, 2011
  2. Thomas RastAug 23, 2011
  3. PJ WeisbergAug 23, 2011
  4. Jens LehmannAug 23, 2011

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.