Try excluding --hard then.. git reset COMMIT
On Fri, Nov 25, 2016 at 2:27 PM Ryan Schmidt <ryandes...@macports.org> wrote: > > > On Nov 25, 2016, at 8:25 AM, rod <r...@pu-gh.com> wrote: > > > > Depends what you want to do when you get there really. > > > > Disclaimer: --hard will wipe out any changes you have in your WC > > > > This will move your current branch to point to that commit... > > > > git reset --hard 72164060176afd82227b03e05aede0ce292f093f > > > > But this applies to the whole git checkout, not a subtree (as i think i > remember you could do with svn...) > > > > Thanks, but: > "I don't want to commit or stash or do anything else to files not in the > current directory." > > > > > > On Fri, Nov 25, 2016 at 2:06 PM Ryan Schmidt <ryandes...@macports.org> > wrote: > > I just committed an update to the lighttpd port, but now I want to get > back to the previous version. > > > > With svn, I would have done: > > > > cd $(port dir lighttpd) > > svn up -r 151090 > > > > How do I do this with git? > > > > I tried: > > > > cd $(port dir lighttpd) > > git checkout 72164060176afd82227b03e05aede0ce292f093f > > > > git complained: > > > > error: Your local changes to the following files would be overwritten by > checkout: > > net/curl/Portfile > > Please commit your changes or stash them before you switch branches. > > Aborting > > > > I don't want to commit or stash or do anything else to files not in the > current directory. I only want the files in the current directory > temporarily rolled back to a previous state for testing. > > > >