Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git remove all local changes

git reset; git checkout .; git reset --hard HEAD; git clean -fdx; 
git fetch --all; git fetch --all --tags; git pull; 
git pull --recurse-submodules
Comment

remove local changes git

git fetch  # will fetch the latest changes on the remote
git reset --hard origin/master # will set your local branch to match the representation of the remote just pulled down.
Comment

remove all local changes git

git reset –-hard
Comment

git discard all local changes

git restore .
Comment

git remove all changes

For all tracked unstaged files use:

git checkout -- .
The . at the end is important.
Comment

PREVIOUS NEXT
Code Example
Shell :: apache disable tls 1.0 
Shell :: neofetch in linux 
Shell :: see stashed changes git 
Shell :: rm directory linux 
Shell :: git replace branch with another 
Shell :: Entire screen debian 
Shell :: bash assigning to new array 
Shell :: bash for stdin 
Shell :: git push existing git repository 
Shell :: jq select where 
Shell :: get current path unix 
Shell :: command not found pipenv zsh 
Shell :: video trimmer ubuntu 
Shell :: failed to push some refs to 
Shell :: how to start elasticsearch correctly 
Shell :: install docker compose ubuntu 20.04 
Shell :: conda update with environment from yml file 
Shell :: bash remove string from string 
Shell :: bash floating point variables 
Shell :: zip files linux 
Shell :: mysqldump cli 
Shell :: linux bash do something when file changes 
Shell :: termux update 
Shell :: docker push to private registry 
Shell :: run docker as user not root 
Shell :: github actions install postgres 
Shell :: aws lightsail ssl installation 
Shell :: how to kill a process in linux 
Shell :: How to install cookies react 
Shell :: merge master into feauture branch 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =