☰
Current Page
Main Menu
Home
Home
Editing
Git Snippets
Edit
Preview
h1
h2
h3
Keybinding
default
vim
emacs
Markup
BibTeX
Markdown
MediaWiki
Org-mode
Plain Text
Pod
RDoc
reStructuredText
Textile
AsciiDoc
Creole
Help 1
Help 1
Help 1
Help 2
Help 3
Help 4
Help 5
Help 6
Help 7
Help 8
Autosaved text is available. Click the button to restore it.
Restore Text
# Fetch the remote ``` git fetch --all git reset --hard origin/main #origin/master ``` # ssh error ``` git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. error: Could not fetch origin eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_rsa ``` # Rollback commit Check if something is committed with: ``` git cherry -v ``` If you know you want to use git reset, it still depends what you mean by "uncommit". If all you want to do is undo the act of committing, leaving everything else intact, use: ``` git reset --soft HEAD^ ``` If you want to undo the act of committing and everything you'd staged, but leave the work tree (your files intact): ``` git reset HEAD^ ``` And if you actually want to completely undo it, throwing away all uncommitted changes, resetting everything to the previous commit (as the original question asked): ``` git reset --hard HEAD^ ```
Uploading file...
Header
### Wiki for Zero Knowledge Discovery, University of Kentucky, Division of Biomedical Informatics [zeroknowledgediscovery.org/wiki](http://34.66.189.202:4567/) <img src="../../logo1.png" alt="drawing" style="width:220px;"/> ---
Sidebar
[[_TOC_|levels = 2]]
Edit message:
Cancel