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

PREVIOUS NEXT
Code Example
Shell :: github oauth 2 
Shell :: yarn global 
Shell :: what is my user ubuntu 
Shell :: current git id 
Shell :: delete a branch git 
Shell :: how to delete all pods in kubernetes 
Shell :: install react react testing library 
Shell :: list node running 
Shell :: check number of cores in ubuntu 
Shell :: clone at a given commit github 
Shell :: how to run .rpm file in linux 
Shell :: git clone with different name 
Shell :: Package signatures do not match previously installed version; ignoring! 
Shell :: how to use compress zip cli linux 
Shell :: linux check which app is using network 
Shell :: how to copy my pub ssh key to server linux 
Shell :: parquet tools install mac 
Shell :: ubuntu software not showing apps 20.04 
Shell :: push to existing repo github 
Shell :: bash for loop 
Shell :: installing haskell command 
Shell :: install from package.json 
Shell :: how to scp from remote machine to local machine 
Shell :: bash read 
Shell :: rename folder shortcut 
Shell :: repo from bitbucket to github 
Shell :: wget a file from bitbucket 
Shell :: How to install vscode on centos 8 
Shell :: terminal trash folder 
Shell :: cherry pick 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =