Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

revert to a particular commit git

git reset --hard <SHAsum of your commit>
git push -f
Comment

how to revert to a specific commit

git revert <commit-hash>
Comment

git revert back to specific commit

# This will create three separate revert commits:
git revert a867b4af 25eee4ca 0766c053

# It also takes ranges. This will revert the last two commits:
git revert HEAD~2..HEAD

#Similarly, you can revert a range of commits using commit hashes (non inclusive of first hash):
git revert 0d1d7fc..a867b4a

# Reverting a merge commit
git revert -m 1 <merge_commit_sha>

# To get just one, you could use `rebase -i` to squash them afterwards
# Or, you could do it manually (be sure to do this at top level of the repo)
# get your index and work tree into the desired state, without changing HEAD:
git checkout 0d1d7fc32 .

# Then commit. Be sure and write a good message describing what you just did
git commit
Comment

Rollback a Particular Commit in git command

git revert 1af17e
Comment

git reset to a specific commit

git reset --hard 61234
git push -f
Comment

PREVIOUS NEXT
Code Example
Shell :: yarn start error error listen EADDRINUSE: address already in use :::8081. 
Shell :: aws folder permission denied 
Shell :: git reset hard to remote 
Shell :: how to install blackeye bash 
Shell :: roblox change leaderboard stats 
Shell :: linux settings not opening 
Shell :: linux monitor outgoing https requests 
Shell :: how to start apache/2.4.6 linux 
Shell :: doom emacs 
Shell :: how to push local repo to github 
Shell :: create conda environment from yaml file 
Shell :: arch linux change timezone 
Shell :: filter npm audit only high 
Shell :: can I change a forked repo name 
Shell :: unable to locate package ubuntu 
Shell :: composer install debian 
Shell :: powershell convert to exe 
Shell :: git stash docs 
Shell :: Can I deploy a branch in netlify 
Shell :: ubuntu alien install 
Shell :: navigate to folder macq 
Shell :: install docker in ubuntu 
Shell :: bin/sh sam: not found 
Shell :: zsh: command not found 
Shell :: git push ci skip 
Shell :: remove git repository 
Shell :: how to install spark on macos 
Shell :: echo date in bash 
Shell :: check total folder size linux 
Shell :: find bigger file on linux centos 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =