On Fri, 14 Jun 2013 10:26:52 -0500
Deanna Delapasse <ddelapa...@gmail.com> wrote:

> I started with this approach yesterday.  I tried this:
> git clone https://acct:p...@gethub.com/....git
> ... i edited a file just to see what would happen
> git checkout <hashcodeOfPriorCommit>
> But git did NOT overwrite the file that I manually changed.  Why was
> that? FYI, this won't happen in 'real life" but I was trying to
> convince myself that the checkout would work.

I'm guessing that what you experienced was due to the fact you did not
*commit* the changes you made (your edits).

In Git, checking out any existing commit tries to merge what's about to
be checked out with any local changes you have.  If proper merging is
impossible, Git will refuse to proceed with the checkout, but
supposedly that wasn't your case so you ended up with commit
<hashcodeOfPriorCommit> checked out with your local changes to edited
file(s) being left as is as there were no conflicts.

I suspect you're not familiar with the way Git works, especially with
how the work tree, the staging area (the index) and the repository
storage communicate with each other.  This might bite you later on so I
suggest you to first do some learning of the tool.  You could start
right at [1] and check out The Book, videos etc.  There are also lots
of tutorials and crash courses.

1. http://git-scm.com/documentation

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to