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 :: remove pods from xcode project terminal 
Shell :: expo start production mode 
Shell :: format pendrive linux 
Shell :: install jq on ubunut 
Shell :: ubuntu install certbot 
Shell :: macos clear dns cache 
Shell :: kill process running on port in windows 
Shell :: install rspec globally vscode 
Shell :: create tar gz file from directory 
Shell :: linux give all files an extension 
Shell :: how to install virtualenv in ubuntu 
Shell :: git log from selected branch 
Shell :: uninstall cheese ubuntu 20.04 
Shell :: ssh-add could not open a connection to your authentication agent centos 
Shell :: kill process for port 
Shell :: conda command not found linux 
Shell :: conda install pyaudio 
Shell :: git stash history 
Shell :: install epel repo centos 7 
Shell :: install google chrome in ubuntu 20.04 
Shell :: The requested nginx plugin does not appear to be installed certbot 
Shell :: apt install nc command 
Shell :: unzip xz file linux 
Shell :: zip not found 
Shell :: process substitution <() bash 
Shell :: laravel routes not working on production 
Shell :: find depth 1 
Shell :: git abort mmerge 
Shell :: upgrade nltk version 
Shell :: install nginx 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =