Rahul Iyer
Rahul Iyer

Reputation: 21025

Reverting to earlier version without access to remote server?

I completed my project in university, but after graduation I no longer have access to the remote git server we used.

If I want to revert to an earlier version, can I still do so ? Will my local folder have all commits saved ? How would I do it?

Upvotes: 1

Views: 31

Answers (1)

Romain Valeri
Romain Valeri

Reputation: 22057

Granted that you have a recent enough version of the repo*, yes, that's one of the great aspects of git : your repo has everything.

If you search in your local repo for branches and commits (through git branch and git log with different options, mostly), you'll be able to inspect and restore any past point of your project history without relying on any connection to a central remote server.

* (when was the last time you fetched from remote? Pulls count too, since it fetches in the background)

Upvotes: 1

Related Questions