Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git undo rebase

git reset --hard ORIG_HEAD
Comment

git undo rebase

git reflog
Comment

revert rebase

The easiest way would be to find the head commit of the branch as it was 
immediately before the rebase started in the reflog...

git reflog

and to reset the current branch to it (with the usual caveats about being
absolutely sure before reseting with the --hard option).
Suppose the old commit was HEAD@{2} in the ref log:

git reset --hard HEAD@{2}
Comment

git undo rebase

git reset --hard HEAD@{5}
Comment

cancel rebase git

git reset --hard HEAD@{2}
Comment

git undo rebase

git reflog # determine pre-rebase head number, N
git reset --hard HEAD@{N}
Comment

PREVIOUS NEXT
Code Example
Shell :: how to upgrade terraform v0.13 on mac 
Shell :: how to make a push in github 
Shell :: gem uninstall version specific 
Shell :: install wsl2 windows 10 pro 
Shell :: can I change a forked repo name 
Shell :: find home dir for user 
Shell :: restart docker 
Shell :: macos kill process on port 
Shell :: composer install debian 
Shell :: pip install in jupyter notebook 
Shell :: ubuntu check permissions of file 
Shell :: git ignore 
Shell :: install pycord 
Shell :: how to commit single file in git 
Shell :: git clone repo with name 
Shell :: install python 3.10 linux (multiple python versions) 
Shell :: virtualbox kernel driver not installed ubuntu 
Shell :: Deleting or removing a directory or folder 
Shell :: fork bomb linux 
Shell :: download clamav ubuntu 20 
Shell :: ubuntu install terraform 
Shell :: checkout remote branch 
Shell :: eslint-plugin-react-hooks 
Shell :: revert git commit 
Shell :: minecraft .bat code 
Shell :: rails aborted! TypeError: superclass mismatch for class Command 
Shell :: git checkout to remote branch 
Shell :: python listen on port 
Shell :: how to install .sh file in ubuntu 
Shell :: brew install mac 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =