Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git discard all changes command

git reset –hard		# Revert uncommitted changes in index
git clean -fxd		# Remove newly created files that not in index
Comment

git revert all local changes

git reset; git checkout .; git reset --hard HEAD; git clean -fdx; 
git fetch --all; git fetch --all --tags; git pull; 
git pull --recurse-submodules
Comment

git undo all changes

use "git restore <file>..." to discard changes in working directory
use "git restore --staged <file>..." to unstage
Comment

PREVIOUS NEXT
Code Example
Shell :: get virtual display linux 
Shell :: dig check dmarc record 
Shell :: docker db instance workbench connection 
Shell :: xargs 
Shell :: git merge cherry pick 
Shell :: linux mint 
Shell :: delete ec2 from terraform 
Shell :: warning: Pulling without specifying how to reconcile divergent branches is discouraged 
Shell :: download file on linus ssh 
Shell :: kali linux not signing in 
Shell :: bash echo each line 
Shell :: bind mount on linux 
Shell :: shell substring last characters 
Shell :: add ufw rule from 
Shell :: how to delete remote file locally on git 
Shell :: samba check config 
Shell :: vault installation 
Shell :: git revert to last commit on remote branch 
Shell :: git untract file 
Shell :: git rebase a local branch into my branch 
Shell :: git recurse submodules 
Shell :: permission denied 
Shell :: how to access the local machine using WSL 
Shell :: how to setup a gitignore 
Shell :: linux change password chpasswd 
Shell :: count file linux 
Shell :: nextjs cli 
Shell :: dos dir to text file 
Shell :: how to create a new group in linux 
Shell :: mv command in linux 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =