<p>Is it possible to undo the changes caused by the following command? If so, how?</p>

<pre><code>git reset --hard HEAD~1
</code></pre>

[{'answer_id': 6636, 'author': 'Pat Notz', 'author_id': 825, 'author_profile': 'https://Stackoverflow.com/users/825', 'pm_score': 9, 'selected': False, 'text': "<p>What you want to do is to specify the sha1 of the commit you want to restore to.  You can get the sha1 by examining the reflog (<code>git reflog</code>) and then doing</p>\n<pre><code>git reset --hard &lt;sha1 of desired commit&gt;\n</code></pre>\n<p>But don't wait too long... after a few weeks git will eventually see that commit as unreferenced and delete all the blobs.</p>\n"}, {'answer_id': 21778, 'author': 'Brian Riehman', 'author_id': 2063, 'author_profile': 'https://Stackoverflow.com/users/2063', 'pm_score': 12, 'selected': True, 'text': '<p>Pat Notz is correct.  You can get the commit back so long as it\'s been within a few days.  git only garbage collects after about a month or so unless you explicitly tell it to remove newer blobs.</p>\n\n<pre><code>$ git init\nInitialized empty Git repository in .git/\n\n$ echo "testing reset" &gt; file1\n$ git add file1\n$ git commit -m \'added file1\'\nCreated initial commit 1a75c1d: added file1\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 file1\n\n$ echo "added new file" &gt; file2\n$ git add file2\n$ git commit -m \'added file2\'\nCreated commit f6e5064: added file2\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 file2\n\n$ git reset --hard HEAD^\nHEAD is now at 1a75c1d... added file1\n\n$ cat file2\ncat: file2: No such file or directory\n\n$ git reflog\n1a75c1d... HEAD@{0}: reset --hard HEAD^: updating HEAD\nf6e5064... HEAD@{1}: commit: added file2\n\n$ git reset --hard f6e5064\nHEAD is now at f6e5064... added file2\n\n$ cat file2\nadded new file\n</code></pre>\n\n<p>You can see in the example that the file2 was removed as a result of the hard reset, but was put back in place when I reset via the reflog.</p>\n'}, {'answer_id': 21873, 'author': 'sverrejoh', 'author_id': 473, 'author_profile': 'https://Stackoverflow.com/users/473', 'pm_score': 7, 'selected': False, 'text': "<p>It is possible to recover it if Git hasn't garbage collected yet.</p>\n\n<p>Get an overview of dangling commits with <code>fsck</code>:</p>\n\n<pre><code>$ git fsck --lost-found\ndangling commit b72e67a9bb3f1fc1b64528bcce031af4f0d6fcbf\n</code></pre>\n\n<p>Recover the dangling commit with rebase:</p>\n\n<pre><code>$ git rebase b72e67a9bb3f1fc1b64528bcce031af4f0d6fcbf\n</code></pre>\n"}, {'answer_id': 29469, 'author': 'Jörg W Mittag', 'author_id': 2988, 'author_profile': 'https://Stackoverflow.com/users/2988', 'pm_score': 5, 'selected': False, 'text': '<p>If you have not yet garbage collected your repository (e.g. using <code>git repack -d</code> or <code>git gc</code>, but note that garbage collection can also happen automatically), then your commit is still there\xa0– it\'s just no longer reachable through the HEAD.</p>\n\n<p>You can try to find your commit by looking through the output of <code>git fsck --lost-found</code>.</p>\n\n<p>Newer versions of Git have something called the "reflog", which is a log of all changes that are made to the refs (as opposed to changes that are made to the repository contents). So, for example, every time you switch your HEAD (i.e. every time you do a <code>git checkout</code> to switch branches) that will be logged. And, of course, your <code>git reset</code> also manipulated the HEAD, so it was also logged. You can access older states of your refs in a similar way that you can access older states of your repository, by using an <code>@</code> sign instead of a <code>~</code>, like <code>git reset HEAD@{1}</code>.</p>\n\n<p>It took me a while to understand what the difference is between HEAD@{1} and HEAD~1, so here is a little explanation:</p>\n\n<pre><code>git init\ngit commit --allow-empty -mOne\ngit commit --allow-empty -mTwo\ngit checkout -b anotherbranch\ngit commit --allow-empty -mThree\ngit checkout master # This changes the HEAD, but not the repository contents\ngit show HEAD~1 # =&gt; One\ngit show HEAD@{1} # =&gt; Three\ngit reflog\n</code></pre>\n\n<p>So, <code>HEAD~1</code> means "go to the commit before the commit that HEAD currently points at", while <code>HEAD@{1}</code> means "go to the commit that HEAD pointed at before it pointed at where it currently points at".</p>\n\n<p>That will easily allow you to find your lost commit and recover it.</p>\n'}, {'answer_id': 5127681, 'author': 'markmc', 'author_id': 627058, 'author_profile': 'https://Stackoverflow.com/users/627058', 'pm_score': 8, 'selected': False, 'text': '<p>The answer is hidden in the detailed response above, you can simply do:</p>\n\n<pre><code>$&gt; git reset --hard HEAD@{1}\n</code></pre>\n\n<p>(See the output of <em>git reflog show</em>)</p>\n'}, {'answer_id': 8844506, 'author': 'Chris', 'author_id': 59198, 'author_profile': 'https://Stackoverflow.com/users/59198', 'pm_score': 6, 'selected': False, 'text': "<p>If you're really lucky, like I was, you can go back into your text editor and hit 'undo'.</p>\n\n<p>I know that's not really a proper answer, but it saved me half a day's work so hopefully it'll do the same for someone else!</p>\n"}, {'answer_id': 11965255, 'author': 'Stian Høiland', 'author_id': 659310, 'author_profile': 'https://Stackoverflow.com/users/659310', 'pm_score': 5, 'selected': False, 'text': "<h2>Example of IRL case:</h2>\n\n<h3><code>$ git fsck --lost-found</code></h3>\n\n<pre><code>Checking object directories: 100% (256/256), done.\nChecking objects: 100% (3/3), done.\ndangling blob 025cab9725ccc00fbd7202da543f556c146cb119\ndangling blob 84e9af799c2f5f08fb50874e5be7fb5cb7aa7c1b\ndangling blob 85f4d1a289e094012819d9732f017c7805ee85b4\ndangling blob 8f654d1cd425da7389d12c17dd2d88d318496d98\ndangling blob 9183b84bbd292dcc238ca546dab896e073432933\ndangling blob 1448ee51d0ea16f259371b32a557b60f908d15ee\ndangling blob 95372cef6148d980ab1d7539ee6fbb44f5e87e22\ndangling blob 9b3bf9fb1ee82c6d6d5ec9149e38fe53d4151fbd\ndangling blob 2b21002ca449a9e30dbb87e535fbd4e65bac18f7\ndangling blob 2fff2f8e4ea6408ac84a8560477aa00583002e66\ndangling blob 333e76340b59a944456b4befd0e007c2e23ab37b\ndangling blob b87163c8def315d40721e592f15c2192a33816bb\ndangling blob c22aafb90358f6bf22577d1ae077ad89d9eea0a7\ndangling blob c6ef78dd64c886e9c9895e2fc4556e69e4fbb133\ndangling blob 4a71f9ff8262701171d42559a283c751fea6a201\ndangling blob 6b762d368f44ddd441e5b8eae6a7b611335b49a2\ndangling blob 724d23914b48443b19eada79c3eb1813c3c67fed\ndangling blob 749ffc9a412e7584245af5106e78167b9480a27b\ndangling commit f6ce1a403399772d4146d306d5763f3f5715cb5a    &lt;- it's this one\n</code></pre>\n\n<h3><code>$ git show f6ce1a403399772d4146d306d5763f3f5715cb5a</code></h3>\n\n<pre><code>commit f6ce1a403399772d4146d306d5763f3f5715cb5a\nAuthor: Stian Gudmundsen Høiland &lt;stian@Stians-Mac-mini.local&gt;\nDate:   Wed Aug 15 08:41:30 2012 +0200\n\n    *MY COMMIT MESSAGE IS DISPLAYED HERE*\n\ndiff --git a/Some.file b/Some.file\nnew file mode 100644\nindex 0000000..15baeba\n--- /dev/null\n+++ b/Some.file\n*THE WHOLE COMMIT IS DISPLAYED HERE*\n</code></pre>\n\n<h3><code>$ git rebase f6ce1a403399772d4146d306d5763f3f5715cb5a</code></h3>\n\n<pre><code>First, rewinding head to replay your work on top of it...\nFast-forwarded master to f6ce1a403399772d4146d306d5763f3f5715cb5a.\n</code></pre>\n"}, {'answer_id': 21227533, 'author': 'martin', 'author_id': 1725579, 'author_profile': 'https://Stackoverflow.com/users/1725579', 'pm_score': 4, 'selected': False, 'text': '<p>I know this is an old thread... but as many people are searching for ways to undo stuff in Git, I still think it may be a good idea to continue giving tips here.</p>\n\n<p>When you do a "git add" or move anything from the top left to the bottom left in git gui the content of the file is stored in a blob and the file content is possible to recover from that blob.  </p>\n\n<p>So it is possible to recover a file even if it was not committed but it has to have been added.</p>\n\n<pre><code>git init  \necho hello &gt;&gt; test.txt  \ngit add test.txt  \n</code></pre>\n\n<p>Now the blob is created but it is referenced by the index so it will no be listed with git fsck until we reset. So we reset... </p>\n\n<pre><code>git reset --hard  \ngit fsck  \n</code></pre>\n\n<p>you will get a dangling blob ce013625030ba8dba906f756967f9e9ca394464a  </p>\n\n<pre><code>git show ce01362  \n</code></pre>\n\n<p>will give you the file content "hello" back</p>\n\n<p>To find unreferenced commits I found a tip somewhere suggesting this.  </p>\n\n<pre><code>gitk --all $(git log -g --pretty=format:%h)  \n</code></pre>\n\n<p>I have it as a tool in git gui and it is very handy.</p>\n'}, {'answer_id': 22319764, 'author': 'neuron', 'author_id': 461421, 'author_profile': 'https://Stackoverflow.com/users/461421', 'pm_score': 3, 'selected': False, 'text': "<p>Made a tiny script to make it slightly easier to find the commit one is looking for:</p>\n\n<p><code>git fsck --lost-found | grep commit | cut -d ' ' -f 3 | xargs -i git show \\{\\} | egrep '^commit |Date:'</code></p>\n\n<p>Yes, it can be made considerably prettier with awk or something like it, but it's simple and I just needed it. Might save someone else 30 seconds.</p>\n"}, {'answer_id': 27990599, 'author': 'Ajedi32', 'author_id': 1157054, 'author_profile': 'https://Stackoverflow.com/users/1157054', 'pm_score': 6, 'selected': False, 'text': '<h1>In most cases, yes.</h1>\n\n<p>Depending on the state your repository was in when you ran the command, the effects of <code>git reset --hard</code> can range from trivial to undo, to basically impossible.</p>\n\n<p>Below I have listed a range of different possible scenarios, and how you might recover from them.</p>\n\n<h2>All my changes were committed, but now the commits are gone!</h2>\n\n<p>This situation usually occurs when you run <code>git reset</code> with an argument, as in <code>git reset --hard HEAD~</code>. Don\'t worry, this is easy to recover from!</p>\n\n<p>If you just ran <code>git reset</code> and haven\'t done anything else since, you can get back to where you were with this one-liner:</p>\n\n<pre><code>git reset --hard @{1}\n</code></pre>\n\n<p>This resets your current branch whatever state it was in before the last time it was modified (in your case, the most recent modification to the branch would be the hard reset you are trying to undo).</p>\n\n<p>If, however, you <em>have</em> made other modifications to your branch since the reset, the one-liner above won\'t work. Instead, you should run <a href="http://git-scm.com/docs/git-reflog" rel="noreferrer"><code>git reflog</code></a> <em><code>&lt;branchname&gt;</code></em> to see a list of all recent changes made to your branch (including resets). That list will look something like this:</p>\n\n<pre><code>7c169bd master@{0}: reset: moving to HEAD~\n3ae5027 master@{1}: commit: Changed file2\n7c169bd master@{2}: commit: Some change\n5eb37ca master@{3}: commit (initial): Initial commit\n</code></pre>\n\n<p>Find the operation in this list that you want to "undo". In the example above, it would be the first line, the one that says "reset: moving to HEAD~". Then copy the representation of the commit <em>before</em> (below) that operation. In our case, that would be <code>master@{1}</code> (or <code>3ae5027</code>, they both represent the same commit), and run <code>git reset --hard &lt;commit&gt;</code> to reset your current branch back to that commit. </p>\n\n<h2>I staged my changes with <code>git add</code>, but never committed. Now my changes are gone!</h2>\n\n<p>This is a bit trickier to recover from. git <em>does</em> have copies of the files you added, but since these copies were never tied to any particular commit you can\'t restore the changes all at once. Instead, you have to locate the individual files in git\'s database and restore them manually. You can do this using <a href="http://git-scm.com/docs/git-fsck" rel="noreferrer"><code>git fsck</code></a>.</p>\n\n<p>For details on this, see <a href="https://stackoverflow.com/q/7374069/1157054">Undo git reset --hard with uncommitted files in the staging area</a>.</p>\n\n<h2>I had changes to files in my working directory that I never staged with <code>git add</code>, and never committed. Now my changes are gone!</h2>\n\n<p>Uh oh. I hate to tell you this, but you\'re probably out of luck. git doesn\'t store changes that you don\'t add or commit to it, and according to the <a href="http://git-scm.com/docs/git-reset" rel="noreferrer">documentation for <code>git reset</code></a>:</p>\n\n<blockquote>\n  <p><strong>--hard</strong></p>\n  \n  <p>Resets the index and working tree. <strong>Any changes to tracked files in the working tree since <code>&lt;commit&gt;</code> are discarded.</strong></p>\n</blockquote>\n\n<p>It\'s possible that you <em>might</em> be able to recover your changes with some sort of disk recovery utility or a professional data recovery service, but at this point that\'s probably more trouble than it\'s worth.</p>\n'}, {'answer_id': 29408886, 'author': 'suhailvs', 'author_id': 2351696, 'author_profile': 'https://Stackoverflow.com/users/2351696', 'pm_score': 7, 'selected': False, 'text': "<p>As far as I know, <code>--hard</code> will discard uncommitted changes. Since these aren't tracked by git. But you can undo the <code>discarded commit</code>.</p>\n<pre><code>$ git reflog\n</code></pre>\n<p>will list:</p>\n<pre><code>b0d059c HEAD@{0}: reset: moving to HEAD~1\n4bac331 HEAD@{1}: commit: added level introduction....\n....\n</code></pre>\n<p>where <code>4bac331</code> is the <code>discarded commit</code>.</p>\n<p>Now just move the head to that commit:</p>\n<pre><code>$ git reset --hard 4bac331\n</code></pre>\n"}, {'answer_id': 43273653, 'author': 'Maciek Łoziński', 'author_id': 1004787, 'author_profile': 'https://Stackoverflow.com/users/1004787', 'pm_score': 3, 'selected': False, 'text': '<p>I\'ve just did a hard reset on wrong project. What saved my life was Eclipse\'s local history. IntelliJ Idea is said to have one, too, and so may your editor, it\'s worth checking:</p>\n\n<ol>\n<li><a href="http://help.eclipse.org/juno/topic/org.eclipse.platform.doc.user/gettingStarted/qs-55.htm" rel="noreferrer">Eclipse help topic on Local History</a></li>\n<li><a href="http://wiki.eclipse.org/FAQ_Where_is_the_workspace_local_history_stored%3F" rel="noreferrer">http://wiki.eclipse.org/FAQ_Where_is_the_workspace_local_history_stored%3F</a></li>\n</ol>\n'}, {'answer_id': 49957891, 'author': 'CodeWizard', 'author_id': 1755598, 'author_profile': 'https://Stackoverflow.com/users/1755598', 'pm_score': 4, 'selected': False, 'text': '<p>Before answering lets add some background, explaining what is this <code>HEAD</code>.</p>\n<h1><em><strong><code>First of all what is HEAD?</code></strong></em></h1>\n<p><code>HEAD</code> is simply a reference to the current commit (latest) on the current branch.<br />\nThere can only be a single <code>HEAD</code> at any given time. (excluding <code>git worktree</code>)</p>\n<p>The content of <code>HEAD</code> is stored inside <code>.git/HEAD</code> and it contains the 40 bytes SHA-1 of the current commit.</p>\n<hr />\n<h1><em><strong><code>detached HEAD</code></strong></em></h1>\n<p>If you are not on the latest commit - meaning that <code>HEAD</code> is pointing to a prior commit in history its called <em><strong><code>detached HEAD</code></strong></em>.</p>\n<p><a href="https://i.stack.imgur.com/OlavO.png" rel="noreferrer"><img src="https://i.stack.imgur.com/OlavO.png" alt="enter image description here" /></a></p>\n<p>On the command line it will look like this- SHA-1 instead of the branch name since the <code>HEAD</code> is not pointing to the the tip of the current branch</p>\n<p><a href="https://i.stack.imgur.com/U0l3s.png" rel="noreferrer"><img src="https://i.stack.imgur.com/U0l3s.png" alt="enter image description here" /></a></p>\n<hr />\n<h3>A few options on how to recover from a detached HEAD:</h3>\n<hr />\n<h3><a href="https://git-scm.com/docs/git-checkout" rel="noreferrer"><code>git checkout</code></a></h3>\n<pre><code>git checkout &lt;commit_id&gt;\ngit checkout -b &lt;new branch&gt; &lt;commit_id&gt;\ngit checkout HEAD~X // x is the number of commits t go back\n</code></pre>\n<p>This will checkout new branch pointing to the desired commit.<br />\nThis command will checkout to a given commit.<br />\nAt this point you can create a branch and start to work from this point on.</p>\n<pre><code># Checkout a given commit. \n# Doing so will result in a `detached HEAD` which mean that the `HEAD`\n# is not pointing to the latest so you will need to checkout branch\n# in order to be able to update the code.\ngit checkout &lt;commit-id&gt;\n\n# create a new branch forked to the given commit\ngit checkout -b &lt;branch name&gt;\n</code></pre>\n<hr />\n<h3><a href="https://git-scm.com/docs/git-reflog" rel="noreferrer"><code>git reflog</code></a></h3>\n<p>You can always use the <code>reflog</code> as well.<br />\n<code>git reflog </code> will display any change which updated the <code>HEAD</code> and checking out the desired reflog entry will set the <code>HEAD</code> back to this commit.</p>\n<p><strong>Every time the HEAD is modified there will be a new entry in the <code>reflog</code></strong></p>\n<pre><code>git reflog\ngit checkout HEAD@{...}\n</code></pre>\n<p>This will get you back to your desired commit</p>\n<p><a href="https://i.stack.imgur.com/atW9w.png" rel="noreferrer"><img src="https://i.stack.imgur.com/atW9w.png" alt="enter image description here" /></a></p>\n<hr />\n<h3><em><strong><a href="https://git-scm.com/docs/git-reset" rel="noreferrer"><code>git reset HEAD --hard &lt;commit_id&gt;</code></a></strong></em></h3>\n<p>&quot;Move&quot; your head back to the desired commit.</p>\n<pre class="lang-sh prettyprint-override"><code># This will destroy any local modifications.\n# Don\'t do it if you have uncommitted work you want to keep.\ngit reset --hard 0d1d7fc32\n\n# Alternatively, if there\'s work to keep:\ngit stash\ngit reset --hard 0d1d7fc32\ngit stash pop\n# This saves the modifications, then reapplies that patch after resetting.\n# You could get merge conflicts, if you\'ve modified things which were\n# changed since the commit you reset to.\n</code></pre>\n<ul>\n<li>Note: (<a href="https://github.com/git/git/blob/master/Documentation/RelNotes/2.7.0.txt" rel="noreferrer">Since Git 2.7</a>)<br />\nyou can also use the <code>git rebase --no-autostash</code> as well.</li>\n</ul>\n<hr />\n<hr />\n<h3><em><strong><a href="https://git-scm.com/docs/git-revert" rel="noreferrer"><code>git revert &lt;sha-1&gt;</code></a></strong></em></h3>\n<p>&quot;Undo&quot; the given commit or commit range.<br />\nThe reset command will &quot;undo&quot; any changes made in the given commit.<br />\nA new commit with the undo patch will be commited while the original commit will remain in the history as well.</p>\n<pre class="lang-sh prettyprint-override"><code># add new commit with the undo of the original one.\n# the &lt;sha-1&gt; can be any commit(s) or commit range\ngit revert &lt;sha-1&gt;\n</code></pre>\n<hr />\n<p>This schema illustrate which command does what.<br />\nAs you can see there <code>reset &amp;&amp; checkout</code> modify the <code>HEAD</code>.</p>\n<p><a href="https://i.stack.imgur.com/NuThL.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NuThL.png" alt="enter image description here" /></a></p>\n'}, {'answer_id': 57491027, 'author': 'ScottyBlades', 'author_id': 3833666, 'author_profile': 'https://Stackoverflow.com/users/3833666', 'pm_score': 5, 'selected': False, 'text': '<p><code>git reflog</code></p>\n\n<ul>\n<li>Find your commit sha in the list then copy and paste it into this command: </li>\n</ul>\n\n<p><code>git cherry-pick &lt;the sha&gt;</code></p>\n'}, {'answer_id': 57531719, 'author': 'Newbyte', 'author_id': 9315690, 'author_profile': 'https://Stackoverflow.com/users/9315690', 'pm_score': 5, 'selected': False, 'text': '<p>If you are using a JetBrains IDE (anything IntelliJ based), you can recover even your uncommited changes via their "Local History" feature.</p>\n\n<p>Right-click on your top-level directory in your file tree, find "Local History" in the context menu, and choose "Show History". This will open up a view where your recent edits can be found, and once you have found the revision you want to go back to, right click on it and click "Revert". </p>\n'}, {'answer_id': 60669149, 'author': 'flyingpluto7', 'author_id': 6343586, 'author_profile': 'https://Stackoverflow.com/users/6343586', 'pm_score': 2, 'selected': False, 'text': '<p>My problem is almost similar. I have uncommitted files before I enter <code>git reset --hard</code>.</p>\n<p>Thankfully. I managed to skip all these resources. After I noticed that I can just undo (<code>ctrl-z</code> for windows/linux <code>cmd-shift-z</code> for mac).  I just want to add this to all of the answers above.</p>\n<p><em>Note. Its not possible to undo unopened files.</em></p>\n<ul>\n<li><a href="https://stackoverflow.com/questions/5473/how-can-i-undo-git-reset-hard-head1">How can I undo git reset --hard HEAD~1?</a></li>\n<li><a href="https://stackoverflow.com/questions/7374069/undo-git-reset-hard-with-uncommitted-files-in-the-staging-area">Undo git reset --hard with uncommitted files in the staging area</a></li>\n<li><a href="https://stackoverflow.com/questions/1108853/recovering-added-file-after-doing-git-reset-hard-head">Recovering added file after doing git reset --hard HEAD^</a></li>\n<li><strong>Medium article:</strong> <a href="https://medium.com/@CarrieGuss/how-to-recover-from-a-git-hard-reset-b830b5e3f60c#.353djvmkb" rel="nofollow noreferrer">How To: Recover From a Git Hard Reset\n(Or, This is Why We Probably Shouldn’t but Totally Can Have Nice Things)</a></li>\n</ul>\n'}, {'answer_id': 60767938, 'author': 'tuan.dinh', 'author_id': 4963534, 'author_profile': 'https://Stackoverflow.com/users/4963534', 'pm_score': 2, 'selected': False, 'text': '<p>This has saved my life: \n<code>https://medium.com/@CarrieGuss/how-to-recover-from-a-git-hard-reset-b830b5e3f60c</code></p>\n\n<p>Basically you need to run:</p>\n\n<pre><code>for blob in $(git fsck --lost-found | awk ‘$2 == “blob” { print $3 }’); do git cat-file -p $blob &gt; $blob.txt; done\n</code></pre>\n\n<p>Then manually going through the pain to re-organise your files to the correct structure.</p>\n\n<p>Takeaway: Never use <code>git reset --hard</code> if you dont completely 100% understand how it works, best not to use it.</p>\n'}, {'answer_id': 63639989, 'author': 'NATALIAGJ', 'author_id': 12296962, 'author_profile': 'https://Stackoverflow.com/users/12296962', 'pm_score': 2, 'selected': False, 'text': '<p><code>git reflog</code> and back to the last HEAD\n6a56624 (HEAD -&gt; master) HEAD@{0}: reset: moving to HEAD~3\n1a9bf73 HEAD@{1}: commit: add changes in model generate binary</p>\n'}, {'answer_id': 68114239, 'author': 'Abdulrahim Klis', 'author_id': 5737758, 'author_profile': 'https://Stackoverflow.com/users/5737758', 'pm_score': 1, 'selected': False, 'text': '<p>git reset --hard - you can use to revert one page and after that you can stash or pull everything from origin again</p>\n'}]
['https://Stackoverflow.com/questions/5473', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/85/']