Working with git: git equivalent of "svn up -r..."

rod rod at pu-gh.com
Fri Nov 25 15:43:35 CET 2016


(Possibly outside the scope of the discussion but I've noticed it mentioned
a few times...) Git works by managing the whole WC together, so changing
individual subtrees and keeping modified files lying around are not the
best way to work with it. Branches and commits can be as ephemeral as
needed.

On Fri, Nov 25, 2016 at 2:32 PM Davide Liessi <davide.liessi at gmail.com>
wrote:

> 2016-11-25 15:27 GMT+01:00 Davide Liessi <davide.liessi at gmail.com>:
> > Try in the directory
> > git checkout 72164060176afd82227b03e05aede0ce292f093f .
> > or even
> > git checkout 72164060176afd82227b03e05aede0ce292f093f <specific file>
> >
> > The last argument can be any path to file or directory in the repository.
>
> I'd just add that the command
> git checkout -- <path>
> adverstised by git status "to discard changes in working directory" is
> equivalent to
> git checkout <current-branch> <path>
>
> Best wishes.
> Davide
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20161125/6a852e4a/attachment.html>


More information about the macports-dev mailing list