Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git delete last commit local and remote

# Undo the last commit locally 
git rebase -i HEAD~1

# Push to update the remote branch
git push --force
Comment

remove last commit git

git reset --hard HEAD^
git push origin -f
Comment

git remove last commit origin

//Undo the last commit locally 
git reset HEAD^

//then push to the remote repository
git push origin +HEAD
Comment

git delete last commit in remote

1
$git rebase -i HEAD~2
Comment

PREVIOUS NEXT
Code Example
Shell :: windows cd to another drive 
Shell :: rollback git 
Shell :: install code . path in mac 
Shell :: enable ip forwarding linux 
Shell :: problema hora windows ubuntu 
Shell :: get string after character shell script 
Shell :: how to verify if pip installed a package 
Shell :: win32gui python 
Shell :: ffmpeg change resolution 
Shell :: installing pipewire 
Shell :: delete local branch git 
Shell :: wasm pack install 
Shell :: ubuntu get external ip 
Shell :: PowerShell remove object from array 
Shell :: Get all changes of the main branch locally 
Shell :: matlab on ubuntu 
Shell :: Set wp-config.php using wp-cli 
Shell :: revert last push to server 
Shell :: javascript bootstrap in reactJs 
Shell :: cordova ios 5.1.0 
Shell :: deactivate laptop keyboard ubuntu 
Shell :: Bash/Shell comment multiple lines 
Shell :: install tesseract 5 ubuntu 
Shell :: node-pre-gyp install failed with error: error: command failed: node-pre-gyp install --fallback-to-build 
Shell :: startup folder location 
Shell :: install cmake debian 
Shell :: remove last space from line 
Shell :: ubuntu set current timezone asia/kolkata 
Shell :: stop supervisor service centos 8 
Shell :: linux shutdown 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =