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

Davide Liessi davide.liessi at gmail.com
Fri Nov 25 15:27:37 CET 2016


2016-11-25 15:05 GMT+01:00 Ryan Schmidt <ryandesign at macports.org>:
> cd $(port dir lighttpd)
> git checkout 72164060176afd82227b03e05aede0ce292f093f

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.

Unfortunately this also stages the checked-out files for commit, so
you probably want also to
git reset HEAD .
or
git reset HEAD <specific file>

Best wishes.
Davide


More information about the macports-dev mailing list