A python script which clones a github repository's structure from root of repository or from a particular folder
Run the script with
python3 cloneSelective.py -u <Github_Repository_URL> [-p Folder_Path] [-s] [-b Branch_Name] [-d]
- -u : Specify the URL of repository to clone from
- -p : Specify required file/folder to selectively clone, If the option is not specified the entire repository is cloned
- -b : Specify the branch to clone, If the option is not specified the master branch is chosen
- -d : Clones only the file/folder mentioned in -p directly without creating the parent directories or other files
- -s : Clone the specified file/folder but create empty directories/files for other things in the repository for future use
python3 cloneSelective.py -u https://github.com/anishbadhri/Formula_Tree -p FormulaTree/ -d
python3 cloneSelective.py -u https://github.com/anishbadhri/Formula_Tree -p FormulaTree/Formula.cpp -d
python3 cloneSelective.py -u https://github.com/anishbadhri/Formula_Tree
python3 cloneSelective.py -u https://github.com/anishbadhri/Formula_Tree -b alternate -d
- Requests
git clone https://github.com/vishalananth07/Selective-git-clone
pip install -r "requirements.txt"
python3 cloneSelective.py -u <Github_Repository_URL> [-p FolderPath] [-s] [-b]