Horje
git delete pushed commit Code Example
cancel a commit not pushed
git reset --soft HEAD~
git delete pushed commit
git reset --hard <last_working_commit_id>

git push --force
git remove commits from branch after push
git reset --hard <last_working_commit_id>
So we must not reset to the commit_id that we don't want.

Then sure, we must push to remote branch:

git push --force
delete a pushed commit
# delete the last commit
$git reset –hard HEAD~
Source: ncona.com
remove commit not pushed
git reset --hard origin/main
git remove last pushed commit
git reset --hard 'xxxxx'

git clean -f -d

git push -f




Shell

Related
npm install custom registry Code Example npm install custom registry Code Example
how to access adb globally on mac Code Example how to access adb globally on mac Code Example
git global username --replace-all Code Example git global username --replace-all Code Example
angular serve open Code Example angular serve open Code Example
install rancher Code Example install rancher Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11