Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git return to last commit

git log
    commit 101: bad commit    # Latest commit. This would be called 'HEAD'.
    commit 100: good commit   # Second to last commit. This is the one we want.
To restore everything back to the way it was prior to the last commit, we need to reset to the commit before HEAD:

git reset --soft HEAD^     # Use --soft if you want to keep your changes
git reset --hard HEAD^     # Use --hard if you don't care about keeping the changes you made
Comment

how to revert to last git commit

git checkout . #This will get rid of all uncommited change
Comment

git revert to last commit

git reset --hard branch_name #Reverts all modified files to last commit on branch
Comment

git how to rollback to previous commit

# Revert is the command to rollback the commits.
git revert 2h3h23233

# push after change
git push
Comment

PREVIOUS NEXT
Code Example
Shell :: start beef kali linux 
Shell :: git branch -r 
Shell :: clipboard manager linux unity 
Shell :: bash script to clean up log files 
Shell :: install node and npm ubuntu 
Shell :: arch linux pacman cannot install 
Shell :: The platform "win32" is incompatible with this module. 
Shell :: delete a github repository using bash 
Shell :: how to stop sql serve 
Shell :: rpm extract 
Shell :: create folder with shell/bash 
Shell :: push particular commit in git 
Shell :: expo init 
Shell :: create multiple copies in linux of file 
Shell :: kubectl get namespaces 
Shell :: composer for windows 
Shell :: fetch fork github 
Shell :: zip a file terminal 
Shell :: sudoer sudo no password NOPASSWORD 
Shell :: source command in shell script 
Shell :: git create a new repository 
Shell :: docker create image and push 
Shell :: install geopandas in jupyter notebook 
Shell :: how to echo string .sh 
Shell :: unix vs linux 
Shell :: install laravel on ubuntu 
Shell :: platformio install arduino lib 
Shell :: install software manager linux kali 
Shell :: openssl verify cert 
Shell :: dukto for ubuntu download 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =