Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git delete last commit after push

git reset --hard HEAD~1
git push -f <remote> <branch>
Comment

git remove last pushed commit

git reset --hard 'xxxxx'

git clean -f -d

git push -f
Comment

delete last pushed commit

$ git reset <previous label or sha1>
$ git commit -am "blabla"                    <--- optional
$ git push -f <remote-name> <branch-name>    
Comment

PREVIOUS NEXT
Code Example
Shell :: close port 
Shell :: bash read a file line by line 
Shell :: ubuntu command line replace word in files 
Shell :: linux full permission to folder 
Shell :: ubuntu install bluetooth drivers 
Shell :: current year bash 
Shell :: git rename remote branch 
Shell :: tmux terminate session 
Shell :: device manager cmd command 
Shell :: how to install soapui on ubuntu 
Shell :: cmd code for downloading git in windows 
Shell :: close port ubuntu 
Shell :: how to update vs code in linux 
Shell :: IP adress terminal 
Shell :: s3 upload file cli 
Shell :: git change personal access token command line 
Shell :: linux kill all python processes 
Shell :: how to download a repository as zip 
Shell :: How to see incognito history? 
Shell :: unregister distro 
Shell :: powershell parameter mandatory 
Shell :: .env.local not working react 
Shell :: delete all files smaller than a certain size linux 
Shell :: django runserver no reload 
Shell :: installing pytesseract in python linux 
Shell :: how to install admin-lte with npm 
Shell :: ssh github generate key 
Shell :: extract tar.xz ubuntu 
Shell :: git grep across all branches 
Shell :: uninstall tensorflow colab 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =