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

git delete unstaged files

git clean -df
Comment

undo unstaged changes git

git checkout -- .
Comment

git discard unstaged files

git stash save --keep-index --include-untracked
Comment

git undo unstaged changes to one file

git restore file
Comment

commit unstaged changes to new branch

git checkout -b new_branch_name
Comment

revert unstaged changes git

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

Revert Unstaged and Staged Changes in git command

git checkout somefile.js
Comment

PREVIOUS NEXT
Code Example
Shell :: add image to readme 
Shell :: find zombie process PID in linux 
Shell :: git revert a specific commit 
Shell :: aws folder permission denied 
Shell :: node sass generate css 
Shell :: ubuntu 20.04 ntfs read only 
Shell :: windows install httpie 
Shell :: ifconfig not found 
Shell :: use to remove snap packages 
Shell :: what are the ubuntu packages required for laravel to be installed 
Shell :: initialize github repository 
Shell :: how to update git 
Shell :: remove folder from repo but keep locally 
Shell :: lines count linux 
Shell :: shell command read first lines 
Shell :: remove all files with no extention rm 
Shell :: *15856 connect() to unix:/var/run/php/php8.0-fpm.sock failed (11: Resource temporarily unavailable) 
Shell :: how to change branch name in github 
Shell :: wget save file with different name 
Shell :: Cargo, the Rust package manager, is not installed or is not on PATH. 
Shell :: flush dns 
Shell :: virtualbox kernel driver not installed ubuntu 
Shell :: how to zip my files without ds_store 
Shell :: how to remove a non empty directory in linux 
Shell :: bash rm all except 
Shell :: install virtualbox extension pack from command line 
Shell :: how to install wireshark 
Shell :: shell script red color 
Shell :: linux update command 
Shell :: install react-native-community hooks 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =