Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

recover lost file git

git log --diff-filter=D --summary
git checkout $commit path/to/file
Comment

git recover deleted file

rm -rf deleted file, if there is any commit before use git commands:
// 1 Find out which comit has the copy of deleted file
git log         
// 2 Use checkout to locate which comit what file location
git checkout branch-number-here -- file/location/in/folder/without/quote
example: git checkout 476c714 -- mvc/public/js/bundle.js 
Comment

PREVIOUS NEXT
Code Example
Shell :: how to install pygame 
Shell :: search by commit message 
Shell :: linux unzip with password 
Shell :: heroku rebuild without commit 
Shell :: virtual host apache2 
Shell :: bash shortcuts 
Shell :: how to end localhost 
Shell :: imagemagick add background to transparent png 
Shell :: grep search for string in directory 
Shell :: create package in ros2 
Shell :: check library installed in google colab 
Shell :: install apache benchmark 
Shell :: remove cache package arch 
Shell :: update aws amplify cli 
Shell :: bash scripts options 
Shell :: dotenv installation 
Shell :: how to save windows lock screen images 
Shell :: install python math library 
Shell :: git change commit id email 
Shell :: vim jump to line number 
Shell :: install ubuntu deb 
Shell :: git check if commit in master 
Shell :: enable rdp windows 10 powershell 
Shell :: chromium on linux 
Shell :: curl skip ssl 
Shell :: wget download list of urls 
Shell :: docker-compose change working dir 
Shell :: installing sh file linux 
Shell :: powershell check if software is installed 
Shell :: delete all stopped docker containers 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =