Skip to content

Latest commit

 

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GHSync

A straightforward Python CLI tool to sync your GitHub repositories to your local machine.

Warning

This tool is deprecated. We now recommend ghsync-gui.

Usage

1. Configure

Run:

ghsync config

This guides you through setup and saves your settings in config.json in the current directory:

{
    "username": "",
    "pat": "",
    "backup_path": "",
    "lfs": true,
    "ignored_repos": ["repo-1", "repo-2"]
}
  • username: Your GitHub username.
  • pat: Personal Access Token (optional; required only for syncing private repos).
  • backup_path: Folder where your repositories will be stored (default: backup).
  • lfs: Set to true to include Git LFS files; default is false.
  • ignored_repos: List the names of repos to ignore, or leave empty to sync all.

2. Sync Repositories

Run:

ghsync sync
  • First run: Downloads all your repositories to backup_path.
  • Subsequent runs: Updates existing repos and fetches any new ones.

Tip: Run periodically to keep your local copy current.

Additional Commands

  • backup
    Compresses your backup folder into a timestamped .zip and deletes the original. Next time you run sync, repos are re-downloaded. Useful for safe storage.

FAQs

What if I leave the PAT configuration empty?

All of your public repositories will be synced normally. Syncing private repositories require a PAT with the permission to read them.

Will I be able to work on the synced repositories?

No. The app uses git clone --mirror to download the repositories, so there will not be a working directory.

About

A straightforward Python CLI tool to backup your GitHub repositories.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages