Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

Delete commit from a branch, git remove my committed changes to a specified branch

1.$ git reset --hard HEAD~1 - The HEAD~1 means the commit before head. 

Or, you could look at the output of git log, find the commit id of the commit you want to back up to, and then do this:
$ git reset --hard <sha1-commit-id>

If you already pushed it, you will need to do a force push to get rid of it...
2.$ git push origin HEAD --force
Comment

PREVIOUS NEXT
Code Example
Shell :: debian 11 openvpn client option missing in network vpn after openvpm installition 
Shell :: linux delete all files except extension 
Shell :: Bash script Ping check utility to do continuous check and result save 
Shell :: How to view unit file content with systemctl command 
Shell :: How to import or export dependencies into env yml conda 
Shell :: windows direct shortcut to programs and features 
Shell :: install mlens 
Shell :: remove file kali linux 
Shell :: Background and Foreground Jobs 
Shell :: samba configuration file in linux for backup and restore server 
Shell :: is there a infinitey infinitey 
Shell :: Ubuntu software in 22.04 store does not use system theme 
Shell :: compilation failed for package in r ubuntu 
Shell :: git commands cheat sheet pdf 
Shell :: uninstall grepper 
Shell :: ufw rules 
Shell :: install node on linux 
Shell :: new-alias vi notepad 
Shell :: check git remote address 
Shell :: packet8 
Shell :: how to use verifly in hardhat 
Shell :: install lru 
Shell :: How to use very_good_cli in flutter 
Shell :: how to convert shell script to yaml file 
Shell :: linux show external drives 
Shell :: renaming files in a folde to sequential numbers and perfix 
Shell :: grep in a laravel project 
Shell :: an error occurred please run package manager 
Shell :: Check servers availability using bash script 
Shell :: install openvino for ubuntu 20 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =