Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git checkout specific file types only

# BASH (Non-Fish compliant script)
git checkout origin/master -- `git ls-tree origin/master -r --name-only | grep ".pex"`
Comment

git checkout specific file types

# You don't need find or sed, you can use wildcards as git understands them (doesn't depend on your shell):
git checkout -- "*.xml"

# The quotes will prevent your shell to expand the command to only files in the current directory before its execution.
# You can also disable shell glob expansion (with bash) :

set -f
git checkout -- *.xml

# This, of course, will irremediably erase your changes!
Comment

PREVIOUS NEXT
Code Example
Shell :: git get stash on another pc 
Shell :: command line if output of command is equal to string 
Shell :: msfvenom x64 windows reverse shell 
Shell :: how to install skimage in pycharm command 
Shell :: how to install clipman for linux 
Shell :: veil framework install 
Shell :: are trying to install ruby-2.7.0 on heroku-20. remote: ! remote: ! Ruby ruby-2.7.0 is present on the following stacks: remote: ! remote: ! - heroku-18 
Shell :: install extension ext-gd * in fedora 
Shell :: unix get time 
Shell :: pip install scikit learn 
Shell :: run katalon docker image 
Shell :: linux count files fast 
Shell :: actualizar linux apt 
Shell :: linux clear lines of log 
Shell :: use localhost for self signed cert 
Shell :: how to add branches 
Shell :: gh configure vim 
Shell :: add suid bit 
Shell :: créer un fichier powershell 
Shell :: bash tab autocomplete pipe 
Shell :: upgrade all content database sharepoint 2013 powershell 
Shell :: grep ignore node_modules 
Shell :: how to install cs50 library in ubuntu 
Shell :: windows 10 ipconfig fix 
Shell :: install opencl headers ubuntu 
Shell :: ubuntu check usb connections 
Shell :: how to generate ssh keys for git 
Shell :: find mtime exec rm 
Shell :: pyenv install mint 
Shell :: dpkg: error processing package libc-bin (--configure): installed libc-bin package post-installation script subprocess returned error exit status 134 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =