Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

discard unstaged changes git

#For all unstaged files in current working directory use:
git checkout -- .
#For a specific file use:
git checkout -- path/to/file/to/revert
Comment

undo unstaged changes git

git checkout -- .
Comment

git undo unstaged changes to one file

git restore file
Comment

revert unstaged changes git

git checkout -- path/to/file/to/revert
Comment

PREVIOUS NEXT
Code Example
Shell :: how to upload code to github 
Shell :: bash delete folder 
Shell :: linux DNS_PROBE_FINISHED_NXDOMAIN 
Shell :: how to remove a non empty directory in linux 
Shell :: linux commad to show directories 
Shell :: night light for ubuntu 
Shell :: install native run 
Shell :: how to uninstall program on ubuntu 
Shell :: launch bash script from application mac without opening terminal 
Shell :: install aws cli on windows 
Shell :: heroku upload local database 
Shell :: gcloud set kubectl context 
Shell :: Show up usb drive in ubuntu if it mounts 
Shell :: pip install geoip2 
Shell :: npm install dev dependencies 
Shell :: how to run spigot server using bat 
Shell :: install passport local 
Shell :: install react-native-community hooks 
Shell :: ubuntu server set static ip 
Shell :: kubectl cheat sheet 
Shell :: git push u origin master 
Shell :: sed remove line after match 
Shell :: how to get homebrew 
Shell :: powershell get-childitem 
Shell :: compress directory with bzip2 
Shell :: install axios 
Shell :: git look at changes to a file 
Shell :: git tutorial remove branches on local that do not exist on remote 
Shell :: install ag in mac 
Shell :: linux move all files to another folder 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =