Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git revert remote branch

credit to: Jakub Narębski, Jeff Ferland and Charles Bailey 

// this is helpful if you have multiple devs working in a repo and they
// have pulled from dev (or whatever branch) and gotten any of the commits
// you're planning on revertting or you don't/can't know if they have pulled. 
// This will set you back to the state of the commit you want without 
// overwriting any of the history. This should help prevent conflicts

$ git reset --hard <commit hash you want to revert to>
$ git reset --soft <commit hash of last/latest commit> or @{1} 
$ git commit -m "reset: resetting back to # without overwriting history"
Comment

PREVIOUS NEXT
Code Example
Shell :: download docker linux 
Shell :: install gitflow 
Shell :: see file from previous commit git 
Shell :: docker jenkins 
Shell :: git get latest log output to file 
Shell :: Generate Key Hashes For Facebook login Android app 
Shell :: kivy install ubuntu 
Shell :: git remove file from repository 
Shell :: Difference between user and group in Linux 
Shell :: cor installation 
Shell :: ajouter tag github 
Shell :: openssl generate passwort terminal 
Shell :: git close private repo 
Shell :: restart nginx windows 
Shell :: libsound2-dev missing 
Shell :: keyboard continuously backspace not working linux 
Shell :: How to install 4k video Downloader YouTube on Ubuntu Linux 
Shell :: hostapd could not GET IP 
Shell :: -f in shell script 
Shell :: instal bable for linux 
Shell :: Replaces the last git commit 
Shell :: apache2 mod_jk proxy to tomcat connector 
Shell :: git delete branch remote 
Shell :: install svgo linux 
Shell :: linux clear lines of log 
Shell :: add vimplug 
Shell :: how to install alfa 1900 driver on ubuntu 
Shell :: docker compose command 
Shell :: git clone all repositories in organization 
Shell :: how to use github code 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =