Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to undo a modified file in git

# If you want to revert the changes only in current working directory
git checkout -- .

# discard anything (note: you have to be in the directory
# where all of the changes are located)
# or you can use the command on line 9, you can discard anything
# on the repo
git checkout -- *
git checkout -- :/

# or if you check the git status message after modifying a file 
# there is this command 
git restore <file>
Comment

PREVIOUS NEXT
Code Example
Shell :: why gitignore not working 
Shell :: install jq command 
Shell :: undo git merge 
Shell :: update brew 
Shell :: list usb devices 
Shell :: cannot install gcc on ubuntu 
Shell :: How to find out where a program is on powershell 
Shell :: qcow2 to vdi 
Shell :: vncserver kali linux 
Shell :: how to clone github repository in my google colab 
Shell :: WSL 2 requires an update to its kernel component. 
Shell :: cursor pointer freezes ubuntu- keystrokes to release 
Shell :: adoni check migration status 
Shell :: install kubenertes using chocolatey 
Shell :: libxml2 install 
Shell :: install werkzeug 
Shell :: kill all processes holding a port 
Shell :: how to upgrade snap packages 
Shell :: mac nano location 
Shell :: download wine for ubuntu 
Shell :: bash: /usr/bin/ng: No such file or directory 
Shell :: shell shortcuts 
Shell :: linux get date yyyymmdd 
Shell :: push a local branch 
Shell :: install mocha 
Shell :: how to know namespace is present or not in kubernetes shell script 
Shell :: remove user from sudo group 
Shell :: git track lfs 
Shell :: how to install mypy 
Shell :: pocketsphinx 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =