Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

get code back after hard reset

git reflog
# find hashes (shas)

git checkout -b someNewBranchName shaYouDestroyed
Comment

get code back after hard reset

#you did git reset --hard and need to get that code back
#One more thing: Suppose you destroy a commit as in the first example, but then discover you needed it after all? Tough luck, right?

#Nope, there's still a way to get it back. Type git reflog and you'll see a list of (partial) commit shas (that is, hashes) that you've moved around in. Find the commit you destroyed, and do this:



git checkout -b someNewBranchName shaYouDestroyed
Comment

PREVIOUS NEXT
Code Example
Shell :: Install Inkscape 1.x manager ubuntu 
Shell :: brownie list saved accounts 
Shell :: redis quicstart 
Shell :: vi search 
Shell :: github push code from one repo to another 
Shell :: git new branch from current 
Shell :: kubectl apply 
Shell :: /usr/local/etc/httpd/httpd.conf 
Shell :: remove all gitlab runners command 
Shell :: tmux status line with blank line on top 
Shell :: flutter build apk github actions 
Shell :: redis mac 
Shell :: No such keg: /usr/local/Cellar/git 
Shell :: shellpish 
Shell :: Install your Dart SDK 
Shell :: create github repo with bash 
Shell :: tar.exe zip format 
Shell :: file system ntfs not configured in kernel 
Shell :: The current application is not compatible with NativeScript CLI 8.0.2 
Shell :: install material table formik 
Shell :: how to download jira 
Shell :: configurer kdiff3 
Shell :: how to find the which linux am i using through terminal 
Shell :: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), 
Shell :: git push origin current branch 
Shell :: clone branch git 
Shell :: How to install LAMP in CentOs? 
Shell :: ffmpeg mp4 to webm 
Shell :: how to open folder in files from terminal linux 
Shell :: how to compare files in terminal 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =