mirror of
https://github.com/donnemartin/data-science-ipython-notebooks.git
synced 2024-03-22 13:30:56 +08:00
Added git commands to revert a commit and to undo a push, leaving the local repo intact.
This commit is contained in:
parent
35583d626c
commit
79d0727912
|
@ -246,6 +246,12 @@
|
|||
"# Undo a file that has not been added\n",
|
||||
"!git checkout — [target]\n",
|
||||
"\n",
|
||||
"# Revert a commit\n",
|
||||
"!git revert\n",
|
||||
"\n",
|
||||
"# Undo a push and leave local repo intact\n",
|
||||
"!git push -f origin HEAD^:master\n",
|
||||
"\n",
|
||||
"# Undo commit but leave files and index\n",
|
||||
"!git reset --soft HEAD~1\n",
|
||||
"\n",
|
||||
|
|
Loading…
Reference in New Issue
Block a user