Horje
remove last commit Code Example
undo commit
# KEEP CHANGES
git reset --soft HEAD~1

# REMOVE CHANGES
git reset --hard HEAD~1
git undo commit
# Uncommit the changes
git reset --soft HEAD~1

# Completely delete the changes
git reset --hard HEAD~1
git cancel last commit
git reset --soft HEAD~1
undo last commit
#this  will preserve changes done to your files
git reset --soft HEAD~1

#this will get rid of the commit and the changes done to the files
$ git reset --hard HEAD~1
 
git delete local commit
git reset --hard origin/<branch_name>
remove last commit
git commit -m "Something terribly misguided"
git reset HEAD~                              
[ edit files as necessary ]                  
git add .                                    
git commit -c ORIG_HEAD 




Shell

Related
debian install postgresql Code Example debian install postgresql Code Example
how to upgrade in linux Code Example how to upgrade in linux Code Example
launch bash script from application mac without opening terminal Code Example launch bash script from application mac without opening terminal Code Example
how to remove filmora watermark Code Example how to remove filmora watermark Code Example
git pull upstream Code Example git pull upstream Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11