Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git undo commit

# Uncommit the changes
git reset --soft HEAD~1

# Completely delete the changes
git reset --hard HEAD~1
Comment

undo local commit

$ git reset --soft HEAD~1
Comment

revert local commit

$ git reset --hard HEAD~1
Comment

how to undo a local commit

git reset HEAD~1
Comment

undo git commit

$ git reset HEAD^ 
Comment

how to undo local commit git

If your commits are only LOCAL, 
you can git reset --hard origin/<branch_name> 
to move back to where the origin is.
Comment

PREVIOUS NEXT
Code Example
::  
Shell ::  
::  
Shell :: ffmpeg add two videos together 
Shell :: remove space at end of each line file 
::  
Shell ::  
Shell ::  
::  
::  
:: code commit on github 
:: install oh my zsh linux 
::  
Shell ::  
:: docker logs last few lines 
:: how to change directory if folder name have space 
::  
:: nodemon script 
Shell ::  
::  
:: environment variables with react and github pages 
Shell ::  
Shell ::  
::  
::  
::  
::  
Shell ::  
Shell ::  
Shell ::  
ADD CONTENT
Topic
Content
Source link
Name
3+7 =