Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to delete commits on github

git reset --hard 71c27777543ccfcb0376dcdd8f6777df055ef479
git push --force
Comment

remove commits from github

git clone 'VerybadRepo.git'
cd VeryBadRepo.git
git log
(find and copy "commit id"  )
git rebase -i "commit id"
remove line with unwanted commits ; save and close editor
git  push -f origin master/main

Comment

remove commit from github

git reset -- MAIN^
git reset -- MAIN^2 (reset last 2 commits)
(increase number for number of commits you want
to delete from your local repo, before youve pushed)
Comment

PREVIOUS NEXT
Code Example
Shell :: delete commit 
Shell :: Octave Install Packages Commands 
Shell :: curl send to ip 
Shell :: install termius ubuntu 
Shell :: refresh desktop entries 
Shell :: check if we can increase of laptop ram 
Shell :: linux install requirements.txt 
Shell :: how to test if docker is running from boot 
Shell :: Linux command line search and replace string in all files 
Shell :: powershell get all computers in ou 
Shell :: Adding local user to Docker group 
Shell :: nextcloud scan files 
Shell :: sample bash script 
Shell :: WARNING: apt does not have a stable CLI interface. Use with caution in scripts. 
Shell :: kill a process linux 
Shell :: video to gif 
Shell :: get working directory rstudio 
Shell :: how to start xampp in ubuntu from terminal 
Shell :: export variable bash 
Shell :: redis remove key 
Shell :: tv on ubuntu 
Shell :: Related to anydesk not opening in ubuntu 
Shell :: apt update package 
Shell :: create directory linux 
Shell :: change directory on WSL 
Shell :: active ssh users in ubuntu 
Shell :: vim exit 
Shell :: git alias - multiple commands 
Shell :: change file permission linux 
Shell :: set email and name which gets baked into the every git commit in the local config file found in ./.git/config 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =