From: Jonathan Nieder <jrnieder@gmail.com>
To: Michael Witten <mfwitten@gmail.com>
Cc: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
rdiezmail-temp2@yahoo.de, Thomas Rast <trast@student.ethz.ch>,
Michael J Gruber <git@drmicha.warpmail.net>,
Hilco Wijbenga <hilco.wijbenga@gmail.com>,
git@vger.kernel.org
Subject: Re: How to check out the repository at a particular point in time
Date: Tue, 23 Aug 2011 11:53:59 -0500 [thread overview]
Message-ID: <20110823165359.GD3545@elie.gateway.2wire.net> (raw)
In-Reply-To: <CAMOZ1BuMfUT4D_UasLXsjDrXRKDw4EF_U-CV8tsS9W7AP+f8ow@mail.gmail.com>
Michael Witten wrote:
> Indeed. That example makes perfect sense when so-called `branches'
> master and new-feature are rightfully thought of as the `pointers'
> (or, `references') that they are.
You are right to point out there is potential for confusion, because
different VCSes model the practice of branching and merging in so many
different ways:
- a single text field in each commit, as in Mercurial
- a list of "sticky" keywords attached to each commit, as in CVS
- special revision numbers, as in CVS
- special directory names, as in Subversion
- pointers to the tip of a line of history, as in Git
Each model has its strengths and weaknesses in terms of supporting
different operations one might to perform on a branch:
- creating a branch
- advancing a branch
- studying the history of development on a single branch
- fetching and pushing
- renaming a branch
- deleting
- comparing the history of two branches
- merging and deleting the now-merged-in branch
- merging and not deleting the now-merged-in branch
- "context switch" from working on one branch to another
In particular, you are right to emphasize that in git's model, "what
was on the foo branch at 12:00pm on Saturday" is just not a well
defined question. The foo branch tip might have been at commit A on
my machine, commit B on a server we share, and commit C on your
machine, so Git doesn't even bother --- branch refs are pointers into
history rather than participating in the history themselves.
Instead, we can content ourselves with the answers to questions like
"what was in the foo branch at 12pm on Saturday on the server used as
a rendezvous point", by logging in and examining the reflog on the
server.
A nice side-benefit is that branch refs are considered to be _private_
unless they are pushed or mentioned in a commit message. So there is
no pressure to come up with good names for them.
Hope that helps,
Jonathan
next prev parent reply other threads:[~2011-08-23 16:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-22 12:25 How to check out the repository at a particular point in time R. Diez
2011-08-22 13:25 ` Thomas Rast
2011-08-22 15:18 ` R. Diez
2011-08-22 16:56 ` Jens Lehmann
2011-08-23 15:54 ` Michael Witten
2011-08-23 16:05 ` Jonathan Nieder
2011-08-23 16:09 ` Matthieu Moy
2011-08-23 16:23 ` Michael Witten
2011-08-23 16:53 ` Jonathan Nieder [this message]
2011-08-24 15:41 ` Andreas Ericsson
2011-08-24 15:48 ` Randal L. Schwartz
2011-08-24 16:18 ` Michael Witten
-- strict thread matches above, loose matches on Subject: below --
2011-08-23 7:41 R. Diez
2011-08-23 9:17 ` Thomas Rast
2011-08-23 10:04 ` PJ Weisberg
2011-08-23 20:30 ` Jens Lehmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110823165359.GD3545@elie.gateway.2wire.net \
--to=jrnieder@gmail.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=hilco.wijbenga@gmail.com \
--cc=mfwitten@gmail.com \
--cc=rdiezmail-temp2@yahoo.de \
--cc=trast@student.ethz.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).