Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

restore deleted commits

# Run this command:
git reflog

# Scan the first few entries, and find the commit that was lost.
# Keep track of the identifier to that commit (you can use either the 1st or 2nd columns).
# Let's call the identifier "ID".
# If you have not made any extra work since you did the reset --hard you can do:
git reset --hard ID
git push -f origin master

# If you have made other work since the reset,
# you could cherry-pick if back onto your branch like this:
git cherry-pick ID
git push origin master
Comment

PREVIOUS NEXT
Code Example
Shell :: element function in terraform 
Shell :: remove all untracked files git 
Shell :: yum install tesseract-ocr 
Shell :: Cask adoptopenjdk8 exists in multiple taps: 
Shell :: docker install ubuntu 20 
Shell :: install yarn 
Shell :: libc-bin error 
Shell :: Show up usb drive in ubuntu if it mounts 
Shell :: how to uninstall sticky notes in ubuntu 
Shell :: git ignore except 
Shell :: git clone in current directory 
Shell :: ffprobe number of frames 
Shell :: origin git 
Shell :: find string terminal 
Shell :: how to install as dev dependency 
Shell :: total disk space in linux 
Shell :: angular add universal 
Shell :: switch installed linx to wsl2 
Shell :: change message from last pushed commit 
Shell :: install brew in mac 
Shell :: Invalid response body while trying to fetch 
Shell :: install brave browser 
Shell :: clone a git branch 
Shell :: install cloudinary storage command 
Shell :: change dns resolver linux 
Shell :: change file permissions terminal 
Shell :: Nextcloud Fedora 36 
Shell :: how to add directory path to path variable ubuntu 
Shell :: Install Zenkit on Linux 
Shell :: git revert to commit 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =