Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to delete a commit in git remotely

If you want to delete for example the last 3 commits, run the following command to remove the changes from the file system (working tree) and commit history (index) on your local branch:

git reset --hard HEAD~3
Then run the following command (on your local machine) to force the remote branch to rewrite its history:

git push --force
Comment

PREVIOUS NEXT
Code Example
Shell :: linux find text in files recursively -include 
Shell :: install bpytop 
Shell :: linux webcam command line 
Shell :: sqlmap POST request injection 
Shell :: iwconfig command not found 
Shell :: apt remove 
Shell :: conda install flask-cors 
Shell :: diskpart assign letter 
Shell :: bash htop 
Shell :: install nativescript version 6 
Shell :: Errors during downloading metadata for repository 
Shell :: docker for elixir 
Shell :: ls human readable size 
Shell :: git reverse last push 
Shell :: jest 
Shell :: bash tee stdout and stderr 
Shell :: node install ubuntu 
Shell :: git checkout branch from remote to local 
Shell :: increment variable bash 
Shell :: choco upgrade 
Shell :: how to install kvm on Ubuntu 22.04 
Shell :: how to install visual studio code in ubuntu 
Shell :: unable to locate a java runtime that supports javaws 
Shell :: unzip command in linux 
Shell :: docker compose example 
Shell :: nuxt install pug 
Shell :: clone using token github 
Shell :: Pyrit download command for linux 
Shell :: install i18next-browser-languagedetector 
Shell :: onedrive ubuntu 20.04 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =