how to revert back to previous commit in git
Shell
//Git Rollback to a specific commit via Mac terminal
//Navigate to project and open git log
cd projectname
git log --oneline
//Locate and checkout the desired commit ID
git checkout abc1234 .
//(Type q to quit the git log)
//Stage All changes, commit with comment, and push to remote
git add -A
git commit -m "Revert commit: abc1234"
git push# This will destroy any local modifications.
# Don't do it if you have uncommitted work you want to keep.
git reset --hard 0d1d7fc32
# Alternatively, if there's work to keep:
git stash
git reset --hard 0d1d7fc32
git stash pop
# This saves the modifications, then reapplies that patch after resetting.
# You could get merge conflicts, if you've modified things which were
# changed since the commit you reset to.
Also in Shell:
- Title
- install jupyter homebrew
- Category
- Shell
- Title
- git get access to private repository
- Category
- Shell
- Title
- gparted ubuntu
- Category
- Shell
- Title
- linux generate file
- Category
- Shell
- Title
- gatsby image plugin
- Category
- Shell
- Title
- install docker linux
- Category
- Shell
- Title
- sed unterminated s command
- Category
- Shell
- Title
- ubuntu ec2 node mongodb connect ECONNREFUSED 127.0.0.1:27017
- Category
- Shell
- Title
- shell copy
- Category
- Shell
- Title
- how to fix the errors in chokidar in linux
- Category
- Shell
- Title
- how to run python in terminal
- Category
- Shell
- Title
- how to install emotion in gatsby
- Category
- Shell
- Title
- git push set upstream
- Category
- Shell
- Title
- set git origin
- Category
- Shell
- Title
- remove yum package
- Category
- Shell
- Title
- react-devtools agent got no connection
- Category
- Shell
- Title
- install redux-thunk
- Category
- Shell
- Title
- htaccess secure
- Category
- Shell
- Title
- createa. branch off of development git
- Category
- Shell
- Title
- yarn change version
- Category
- Shell
- Title
- BDD framework in testcomplete github
- Category
- Shell
- Title
- rsync backup
- Category
- Shell
- Title
- git refusing to merge unrelated histories
- Category
- Shell
- Title
- shell hide tab
- Category
- Shell
- Title
- bootstrap node install
- Category
- Shell
- Title
- list config git
- Category
- Shell
- Title
- get ip address linux
- Category
- Shell
- Title
- angular new project
- Category
- Shell
- Title
- how to pip install in folder
- Category
- Shell
- Title
- grub file path
- Category
- Shell
- Title
- install dateutil
- Category
- Shell
- Title
- how to install node modules python
- Category
- Shell
- Title
- npm install mongoose error npm ERR! code ENOSELF
- Category
- Shell
- Title
- git files changed between two commits
- Category
- Shell
- Title
- npm warn ws butterfly install peer dependencies
- Category
- Shell
- Title
- Tensorflow GPU Installation conda
- Category
- Shell
- Title
- linux datei erstellen
- Category
- Shell
- Title
- remove file history from git
- Category
- Shell
- Title
- ubuntu nginx installation
- Category
- Shell
- Title
- react navigation install
- Category
- Shell
- Title
- haproxy in centos 7
- Category
- Shell
- Title
- ssl erzwingen htaccess
- Category
- Shell
- Title
- debian install vim
- Category
- Shell
- Title
- install maven homebrew
- Category
- Shell
- Title
- install ip addr on ubuntu
- Category
- Shell
- Title
- react quill
- Category
- Shell
- Title
- list all the files in a directory without the directory in linux
- Category
- Shell
- Title
- connect to amazon aws linux
- Category
- Shell
- Title
- macos read ext4
- Category
- Shell
- Title
- gzip folder with tar and exclude directories
- Category
- Shell
- Title
- how to bash into docker container
- Category
- Shell
- Title
- ubuntu show disk space
- Category
- Shell
- Title
- grep docker logs
- Category
- Shell
- Title
- git remove remote file keep local
- Category
- Shell
- Title
- ubuntu bluetooth not listed
- Category
- Shell
- Title
- how to create a new group in linux
- Category
- Shell
- Title
- remove all files with no extention rm
- Category
- Shell
- Title
- error: src refspec master does not match any. git
- Category
- Shell
- Title
- ufw allow postgresql
- Category
- Shell
- Title
- install sailsjs
- Category
- Shell
- Title
- resolv conf linux is being overwritten centos 7
- Category
- Shell
- Title
- check powershell version
- Category
- Shell
- Title
- make diff git as commit
- Category
- Shell
- Title
- wtmp is not readable
- Category
- Shell
- Title
- ssh usage copy file
- Category
- Shell
- Title
- list all services using systemctl
- Category
- Shell
- Title
- git commands
- Category
- Shell
- Title
- rec: command not found
- Category
- Shell
- Title
- install axios
- Category
- Shell
- Title
- timedatectl
- Category
- Shell
- Title
- whats the internet
- Category
- Shell
- Title
- gcloud cd /root permission denied
- Category
- Shell
- Title
- run mysql xampp shell
- Category
- Shell
- Title
- space command line mac
- Category
- Shell
- Title
- how to install wordpress ubuntu 16.04 rosehosting
- Category
- Shell
- Title
- gats gatsby-plugin-offline
- Category
- Shell
- Title
- how to get mac cpu temp
- Category
- Shell
- Title
- ubuntu remove temp files
- Category
- Shell
- Title
- git show diff between branches
- Category
- Shell
- Title
- apt uninstall
- Category
- Shell
- Title
- how to create gitignore
- Category
- Shell
- Title
- how to save environment variables ubuntu
- Category
- Shell
- Title
- bash remove random files from directory
- Category
- Shell
- Title
- directory diff
- Category
- Shell
- Title
- julia install linux
- Category
- Shell
- Title
- pip install upgrade all
- Category
- Shell
- Title
- ubuntu stop process on port
- Category
- Shell
- Title
- homestead.yaml adding provisions
- Category
- Shell
- Title
- delete a file in cmd windows
- Category
- Shell
- Title
- show output after a keyword in shell script in a file
- Category
- Shell
- Title
- ansible-galaxy install to specific directory
- Category
- Shell
- Title
- ubuntu bionic docker container install chrome
- Category
- Shell
- Title
- Running modprobe bridge br_netfilter failed with message: ip: can't find device
- Category
- Shell
- Title
- make docker sudo less
- Category
- Shell
- Title
- linux loop over all arguments one by one
- Category
- Shell
- Title
- ubuntu fractional scaling
- Category
- Shell
- Title
- xcode clean derived data command line
- Category
- Shell
- Title
- powershell create service
- Category
- Shell
- Title
- increase no of watchers
- Category
- Shell
- Title
- apt remove ppa
- Category
- Shell