Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git remove commit

# Removes latest commit from the stash, KEEPS changes
git reset --soft HEAD~

# Removes latest commit from the stash, DELETES changes
git reset --hard HEAD~
Comment

delete commit

git checkout master
git reset --hard e3f1e37
git push --force origin master
# Then to prove it (it won't print any diff)
git diff master..origin/master
Comment

how to delete a commit from a branch

# How to stash and remove a commit from a branch that has already been pushed

git stash save "<comment>"
git stash pop

# git stash list

git reset --hard HEAD~1
# 1 stands for the amount of commits to go back from HEAD

git push origin HEAD --force
Comment

delete commit

git revert dd61ab23
Comment

PREVIOUS NEXT
Code Example
Shell :: vlc media player download for fedora 
Shell :: github readme.md add image 
Shell :: install elasticsearch on ubuntu 
Shell :: kill running port in ubuntu using procees id 
Shell :: install gitlab runner on centos 
Shell :: generate crt and key openssl 
Shell :: upgrade docker-compose version 
Shell :: ubuntu 14 Some index files failed to download. They have been ignored, or old ones used instead. 
Shell :: how to find all the dir in current working directory in linux 
Shell :: git check if stash exists 
Shell :: bash split string into array 
Shell :: bash else if 
Shell :: powershell select unique 
Shell :: delete auto purge 
Shell :: git track remote branch 
Shell :: undo previous commit locally 
Shell :: fix kde root themes 
Shell :: git commit messages 
Shell :: How to Change Your MySQL/phpmyadmin Password in XAMPP 
Shell :: install tar.xz in ubuntu 20.4 
Shell :: run sh with parameter 
Shell :: git reset head to previous commit 
Shell :: angular cli disable auto reload 
Shell :: class sorting in tailwindcss 
Shell :: git pull onbly submodule 
Shell :: batteryreport win10 
Shell :: How to create or generate secret key for django 
Shell :: print hello world in shell script 
Shell :: You need to have the Android SDK Build-tools installed on your system 
Shell :: The platform "win32" is incompatible with this module. 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =