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 :: how to install redux for react native 
Shell :: get serial number for server using powreshell 
Shell :: how to avoid some files changes to not come in git status 
Shell :: list all files with extension lknux 
Shell :: powershell add to list 
Shell :: linux split with filename extension 
Shell :: add dependencies to package.json 
Shell :: docker run -p port:port meaning 
Shell :: `path` for shell provisioner does not exist on the host system: 
Shell :: github download all branches zip 
Shell :: laravel 7 upgrade 
Shell :: recover commits done on HEAD 
Shell :: install jitsi on ubuntu 
Shell :: Jupyter %%time 
Shell :: powershell show calendar 
Shell :: use docker redis remotely 
Shell :: kali linux time settings 
Shell :: gen rsa 1024 
Shell :: apache2 default url 
Shell :: How To Move Folder Using Batch Script 
Shell :: win terminal turn off screen 
Shell :: show other systems in the pc or laptop in the grub 
Shell :: ubuntu wifi drivers realtek 
Shell :: filter match in line sed 
Shell :: get client secret azure app registration powershell 
Shell :: zsh: command not found: sublime 
Shell :: add my current project to an already existing GitHub repository 
Shell :: how to install ros package 
Shell :: docker compose recreate 
Shell :: kali linux nit signing in 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =