Back to Blog
You can see the commits which have made modifications to given file(s) very easily: git log path/to/file So let's start with finding the right commit. (We can't just muck around with history, because we've already pushed this content, and editing history messes with everyone else.) Once we know that, we'll need to make a new commit reverting the file to that state. So, we have to know which commit has the version of the file we want. It just tracks content - a commit is essentially a snapshot of the work tree, along with some metadata (e.g. First of all, git doesn't keep version numbers for individual files. We've made some number of commits, five of which changed a given file, and we want to revert the file to one of the previous versions. Behind the scenes, it will create a major version (just FYI).Let's start with a qualitative description of what we want to do (much of this is said in Ben Straub's answer).So head over to the page, check it out, make sure the restored look and feel is what you wanted, then just hit Republish to make it visible to everyone else.This allows you to check it out before making it official. Again, what that means is that the page is restored, but not published. You will notice a minor version appear (not a major one) – for example, in my case it is 49.1. When you get the warning pop-up, click OK.Click the drop-down next to the version you would like to restore, then choose Restore.Locate the page you need to restore, right-click on that page and choose Version History.Click on Site Pages (Site Pages is a special library on each and every site specifically for the storage of all the pages on a site).You just need to know where to find this. Just like with documents, every time you publish/republish a page, it creates another version of the Page. We will use the same powerful feature that is available for us with documents – it is called Version History. Luckily, we can still restore here is how to do this. Once you Publish the page, you can no longer Undo. How to restore and undo the changes on SharePoint Pages after publishing the page Once you hit the Publish button, you can no longer Undo and have to use the method described below. Very important to note that you can only Undo the changes while you are editing (before hitting Publish/Republish button). It works just like in Microsoft Word, pretty much reverts back 1 step at a time. If you were editing the page and did something stupid (i.e., deleted a web part you did not mean to or changed the layout of the page), you can easily go back using the Undo button. How to restore and undo the changes on SharePoint Pages while editing the page Please check out this most recent blog post for the new instructions. While the instructions in this post are still fines, there is now a new, modern way to restore the previous versions of the pages. Since I originally published this post, Microsoft had updated and modernized the Restore experience. The cool thing is – you can easily restore and undo the changes on SharePoint Pages. However, what that also means is that it is super easy now to mess things up, by deleting web parts and text you or someone else worked on. I demonstrated previously how easy it is to build a page. It is something your mother can do now without needing to have a Ph.D. It has now become straightforward to edit pages, add text and web parts. The arrival of the modern SharePoint pages has really simplified the editing process for SharePoint sites.
0 Comments
Read More
Leave a Reply. |