GitHub-SubFolder-Cloner is a simple bash script that allows you to clone subfolders from any GitHub repository.
You need to have Ubuntu and GitHub installed on your system.
Step 1:
git clone --depth=1 [email protected]:suhailroushan13/GitHub-SubFolder-Cloner.git ~/GitHub-SubFolder-Cloner
cd ~/GitHub-SubFolder-Cloner
chmod +x script.sh
bash script.sh
Step 2:
zsh (macOS 10.15+)
echo 'alias git-sub="bash ~/GitHub-SubFolder-Cloner/script.sh"' >> ~/.zshrc
source ~/.zshrc
bash (Windows/Linux)
echo 'alias git-sub="bash ~/GitHub-SubFolder-Cloner/script.sh"' >> ~/.bashrc
source ~/.bashrc
To know which shell
echo $SHELL
Type the below command from anywhere to run the script.
git-sub
- @suhailroushan13 - Idea & Initial work
- @Abdul535 - Added Custom Folder Name Functionality See also the list of contributors who participated in this project.
- Hat tip to anyone whose code was used
- Inspiration
- References