#Reset author for the current repo:

git config --local user.name "Alex Smith"

git config --local user.email alex@email.com

#Now reset the author of your commit without edit required:

git commit --amend --reset-author --no-edit

#Force push your changes without overwriting anyone else's commits:

git push --force-with-lease

# BEFORE PUSH
git reset --soft HEAD~

# Add number to the end for multiple commits. e.g
git reset --soft HEAD~2
# 3 simple steps to undo a pushed commit

git revert <commit_hash> # get your latest hash from git log or the git repository e.g aaaa1bbbb2 
git merge  # nano opens up, Ctrl O , Ctrl X
git pushgit revert <commit_hash>
git reset <previous label or sha1>
git commit -am "commit message"
git push -f <remote-name> <branch-name>  //  git push -f origin master# Find the commit hash of the commit you want to revert
git log

# Revert the commit using its hash
git revert <commit-hash>

# Push the revert commit to the remote repository
git push origin <branch-name>git reset # commitId
# Exemple
git reset 5310517To reset a brancj to some good commit:

In the server, move the cursor back to the last known good commit:

git push -f origin <last_known_good_commit>:<branch_name>

Locally, do the same:

git reset --hard <last_known_good_commit>
#         ^^^^^^
#         optionalgit reset <previous label or sha1>
git commit -am "blabla"
git push -f <remote-name> <branch-name>git reset <hash> # Run this then merge, commit, and pushgit revert <commit_hash>

Shell/Bash相关代码片段

imperative configmap command

how to show ip address in linux

linux libreoffice cli convert docx to txt

how to install .run file in ubuntu

start tensorboard

how to install xampp in ubuntu

matlab install toolbox

how to open matlab after installation

matlab installation key

rebasing git

how to check if apache is installed

install dual boot ubuntu windows 10

yay install pip

Hold linux kernel packages

Install apache utils

Install necessary software properties

Configure automatic restart

list pods all namespaces

Change remote origin url

echo path replace : with linebreak

git unstage all

install miniconda

docker keeps creating new containers

set git credentials with access token

docker ststus

instalar insomnia linux

install jenkins docker

install docker debian 5

AddDbContext

AddNewtonsoftJson

zip except folder

install openmpi ubuntu

remove anydesk from startup linux

stabalize a linux shell with one python command

move images without registry

composer drupal installation

remove bash history forever

docker compose pull latest image

windows create shortcut that rins cmd

ubuntu cannot play mp4 video

install jupyter kernel

wsl networking becomes slow windows 10

dynamic python aliases on mac

git remove file from gitirgnore

croc zsh autocomplete fix

src refspec does not match any : git push error

cannot install lap

npm status codes

pm2 in cronjob

convert raw to qcow2 qemu-img

add passphrase to ssh key

linux flush write cache

connect to gitlab without password using ssh

alias linux command

install dbt

longhorn in eks error install open iscsi

npm install prod only

permission denied: ./

vite react install

gnome workspace rename

connect to wifi using linux terminal

B188E2B695BD4743

trouble.nvim

sign_and_send_pubkey: signing failed for ed25519

how to kill all the processon gpu in linux

selenium auto install chrome driver

sed replace space with newline

how to reoload bashrc

Git Cheat sheet

reset migrations and db prisma

prisma force restart

shutdown server remote

install hiddify

redo git commit

how to install wine in fedora39

docker alpine

apt packages kept back

git revert last commit after push

crontab restart

crontab start