Skip to content

Extract files or directories from a git repository

License

Notifications You must be signed in to change notification settings

mfdeux/git-extract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIT license PyPI version fury.io

git-extract

Extract files or directories from a git repository

Installation

$ pip install git-extract --upgrade

Official PyPi Repository

Usage

Extract files with multiple patterns:

$ git-extract file https://github.com/mfdeux/git-extract --pattern "*.md" --pattern "*.py" --dest ~/Downloads/test --recursive

Extract directory with pattern:

$ git-extract dir https://github.com/mfdeux/git-extract --pattern "tests" --dest ~/Downloads/test

Patterns

Multiple patterns are acceptable -- as many as you want!

You can think of patterns as filters. When git-extract is looking throughout the git repository, it will match files or directories based on the patterns supplied.

All patterns are based on standard Python glob patterns.

You can read more about how to construct the patterns at: https://docs.python.org/3/library/glob.html