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 :: check disk space ubuntu from terminal 
Shell :: bash script template 
Shell :: binding a mac to AD terminal 
Shell :: git change author of first commit 
Shell :: how to replace string in a json sed 
Shell :: upload github 
Shell :: resolvconf set dns 
Shell :: update cargo 
Shell :: apt find package 
Shell :: does jupyter notebook come with anaconda in ubuntu 
Shell :: debian give write permission 
Shell :: apache2 change directory root 
Shell :: brew upgrade except 
Shell :: how to update alias in linux 
Shell :: git commit -m author identity unknown 
Shell :: how to clone a specific git tag 
Shell :: access windows files on wsl 
Shell :: add user to group 
Shell :: ip config ubuntu 
Shell :: bash change text in specific column 
Shell :: Get total duration of video files in a directory 
Shell :: github drupalcomposer project 
Shell :: conda check cuda version 
Shell :: install sdkman 
Shell :: ubuntu show services list 
Shell :: could not connect to server: Connection refused Is the server running on host and accepting TCP/IP connections on port 5432? 
Shell :: cannot delete branch checked out at 
Shell :: delete a line starting with sed 
Shell :: how to make a list bash 
Shell :: git ignore users permissions 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =