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 :: snap-update-ns failed with code 1 
Shell :: clean remove npm with cache 
Shell :: instalar docker compose ubuntu 
Shell :: github repo with most issues 
Shell :: linux kill process by pid 
Shell :: push heroku 
Shell :: bash grep find lines that start with word 
Shell :: remove directory from git 
Shell :: git bash anaconda 
Shell :: How to replace a string in multiple files in linux command line 
Shell :: create cert from pem 
Shell :: expo install react native gesture 
Shell :: to see all after commit in local repository in git 
Shell :: bash get user input 
Shell :: change default kube editor 
Shell :: Terminal commands to push a file to Github 
Shell :: nuget equivalent of npm install 
Shell :: apply gitignore after commit 
Shell :: bash create folder in current directory 
Shell :: github actions configure aws credentials 
Shell :: delete ppa repository ubuntu 
Shell :: how to install teamspeak server arch linux 
Shell :: how to install free download manager on linux 
Shell :: git push to branch 
Shell :: conda install jupyter notebook 
Shell :: linux process holding deleted file 
Shell :: reset bash_profile 
Shell :: webmin restart 
Shell :: get request linux terminal 
Shell :: brew install jenv 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =