Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git revert uncommitted changes

# Revert changes to modified files.
git reset --hard

# Remove all untracked files and directories.
# '-f' is force, '-d' is remove directories.
git clean -fd
Comment

git check for uncommitted changes

//CHECK FOR UNCOMMITED CHANGES
git status -s

//If there are no changes has no output
//If there are changes are listed the modified files
Comment

git uncommit last commit but keep changes

# https://stackoverflow.com/a/44672195/3013522
git reset --soft HEAD~
Comment

revert uncommitted changes git

git reset
git checkout .
git clean -fdx
Comment

git reset uncommitted changes

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

PREVIOUS NEXT
Code Example
Shell :: view git username 
Shell :: amend last commit message 
Shell :: download chrome command line kali linux 
Shell :: pipenv an error psycopg2 
Shell :: visual studio code for ubuntu 20.04 
Shell :: bsd vs linux 
Shell :: extract numners from string linux 
Shell :: yarn install chocolatey 
Shell :: serve : File C:UsersMY PCAppDataRoaming pmserve.ps1 cannot be loaded because running scripts is disabled on this system 
Shell :: how to update a local project from git 
Shell :: git list remotes 
Shell :: angular cli ubuntu 
Shell :: how to update all packages debian 
Shell :: composer drush 
Shell :: rerun supervisor 
Shell :: redis cli connect to remote server with password 
Shell :: how to update ionic 
Shell :: linux kill all python processes 
Shell :: install system images sdkmanager 
Shell :: install wine linux 
Shell :: install make on windows 
Shell :: windows make 
Shell :: remove port binding windows 
Shell :: bash gnome-terminal Unable to init server: Could not connect: Connection refused # Failed to parse arguments: Cannot open display: 
Shell :: how to install ansible in debian 
Shell :: qpdf decrypt with password 
Shell :: git ubuntu store credential 
Shell :: powershell get ram info 
Shell :: restart docker daemon windows 
Shell :: mac anydesk start at login 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =