Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

reset a file to last commit git

git checkout <hash> -- file1/to/restore file2/to/restore
Comment

git reset a single file to previous commit

git checkout c5f567 -- file1/to/restore file2/to/restore
Comment

git revert commit for single file

git checkout <commit_hash> path/to/file
Comment

PREVIOUS NEXT
Code Example
Shell :: open directory 
Shell :: how to navigate to a folder in cmd windows 10 
Shell :: npx gitignore generator 
Shell :: find ip curl 
Shell :: git merge branch to another branch 
Shell :: ubuntu customize Bash prompt 
Shell :: INSTALL gedit on kali linux 
Shell :: start mongodb ubuntu 
Shell :: bash echo in variable 
Shell :: how to shutdown windows 11 in powershell 
Shell :: why gitignore does not work 
Shell :: install brew mac 
Shell :: sudo apt install xfce4 xfce4-goodies -y 
Shell :: svelte typescript 
Shell :: How do I revert a Git repository to a previous commit? 
Shell :: allow-unauthenticated not working 
Shell :: To install Scrapy on Ubuntu (or Ubuntu-based) systems 
Shell :: install vmware workstation linux mint 
Shell :: create new repository in git bash 
Shell :: list files in cmd 
Shell :: powershell tcp reverse shell 
Shell :: terminal trash folder 
Shell :: docker loki 
Shell :: composer install ubuntu 
Shell :: creating docker based vms with ranchervm but requires KVM installed 
Shell :: bash sum float numbers 
Shell :: install beego ubuntu 
Shell :: ls recursive 
Shell :: shellpish 
Shell :: after checking out a previous commit go back to latest commit 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =