Get your github workspace synced!
Project description
Hubsync
This script allows you to keep the organization you work in sync with your local workspace.
The main objective is to centralize your workflow and integrate all the syncronization and cleaning activities you perform daily related to your local file structure and your github organization
You can get it with pip by running “pip install hubsync”.
Want to contribute? Have a look to our guidelines
How it works
The script mainly relies on your config file “.hubsyncrc” to run all the commands and to customize how to sync your github projects locally
Based on the options within the config files it will sync locally all the organizations you belong too as folders and will create git repositories within them for each github repostory within the org.
Moreover, within your local repostiories it will delete all stale branches and set three remotes:
origin: url of the main repo (push is disabled)
upstream: url of the main repo (both pull and push)
fork: url of a fork of the repo within your user space
Note that if you are the owner of the repo only origin will be set
Config File
The hubsync config file contains all the configuration that hubsync requires and it is the main way to customize the script.
It should be located in in your home with the name .hubsyncrc (~/.hubsyncrc)
As your hubsyncrc file includes your github token, remember to make it not readable to any user but yourself.
chmod 600 ~/.hubsyncrc
Example
An example of its minimun content (mandatory params) is:
See this guide about how to generate a token
All options
Below you can find all config options with an explanation and the default value
global
interactive: Set to false to never get prompted. Hubsync will use defaults always. (True)
sync_user: Sync user repositories locally? (True)
fork_repos: Create a fork of all organization repos in your user space. (False)
case_sensitive: Whether to considering the case when matching github repos and your local folders. (True)
github
api_url: base url of the github api, use this if you want to use hubsync in a github enterprise instance. (https://api.github.com)
token: github api token. Never share this with anyone.
org
pre: shell command to run before syncing an organization (None)
post shell command to run before syncing an organization (None)
repo
pre: shell command to run before syncing an repo (None)
post shell command to run before syncing an repo (None)
Note: Work ongoing
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file hubsync-0.2.8.tar.gz
.
File metadata
- Download URL: hubsync-0.2.8.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58e4ddfb2b25c47a29200f3bca55c903104c190c86806c40751e185c496f445b |
|
MD5 | 251b906e86cf11eda6ceb49eb9b523c9 |
|
BLAKE2b-256 | 40076b0d579b5d59c1e2be53144eae12dae7eac31bdbe356568462aa402b93ac |