multigit cloning for many different organization, branches, projects on github
- load projects from
.projectsfile - load branches from
.branchesfile - load all project from each organization on
.orgsfile list
options:
- if repo is existing, trying to pull
- don't clone forked repo
- check if each project has correct structure, projects, files inside, based on
.structurefile- if they don't have create a repo in org and clone
git clone https://github.com/docutemp/templates.gitlocal
python3 -m venv path/to/venv
source path/to/venv/bin/activate
python3 -m pip install requests
python3 ./multigit.py ~/githubpython update
sudo python3 -m pip install --upgrade piplocal
python3 -m venv path/to/venv
source path/to/venv/bin/activate
python3 -m pip install requestsinit requirements
pip freeze > requirements.txtinstall dependencies
pip install -r requirements.txtclone
git clone https://github.com/multigit-com/python.gitconfiguration
chmod +x ./init.sh
./init.sh github-usernamepackages
python3 -m pip install requests # for Python 3.xpython3 splitup.py multigit.py function
python3 depend.py functionThe script multigit.py executes a shell command (git clone) for each repository. This command requires that you have git installed and properly configured on your system.
Please note that you should have appropriate permissions to clone the repositories that you're trying to access, otherwise, you may run into authentication issues. Additionally, GitHub API tokens are sensitive and should be kept secure. If you accidentally expose your token, make sure to revoke it immediately and generate a new one.
- Before running the script, ensure you have Git installed on your system and that the script has execute permissions.
- To use this script, you must have:
- A file named
.orgsin the same directory as the script, containing a list of organization names, each on a new line. - A file named
.tokenin the same directory as the script, containing your GitHub API token
- A file named
python3 ./multigit.py ~/githubcheck list of folders (organizations) and included subfolders (projects)
cd ~/github
find . -maxdepth 1 -mindepth 1 -type d -exec sh -c 'echo "{}: $(find "{}" -maxdepth 1 -mindepth 1 -type d | wc -l)"' \;update_repo_on_github(api_token, org_name, repo_name, description, domain):
- by voice
- by shell
- by web app
API documentation