As a collaborator on GitHub projects who heavily relies on forks, I found myself performing a repetitive task every morning: syncing my forks with the parent repositories to stay up-to-date. This manual 3-step process of navigating GitHub, checking for updates, and syncing felt like an everyday chore.
Being a developer, I decided to automate this!
Introducing syncb, a simple script that streamlines your workflow with a single command. With syncb
, you can effortlessly sync both public and private forks, saving you valuable time and frustration.
Getting Started
Install syncb
globally using npm:
npm i -g syncb
Run syncb
in your terminal.
That's it! syncb
seamlessly syncs your repository with the latest commits from the parent repository.
Using Private Forks
Initially, I encountered authorization issues (401 errors) when syncing private forks. To overcome this, you can securely store a GitHub Personal Access Token (PAT) with repo access in your environment variable as GITHUB_TOKEN
(e.g., .zshrc). syncb
will automatically leverage this token for private repo syncing.
Share and Contribute!
Did syncb
make your life easier? Share it with a star ⭐ on the repository! Additionally, I'd love to hear your preferred fork syncing methods – perhaps you have a more efficient approach? Feel free to contribute to the project as well!
Connect with me!
Visit sidharthmohanty.com to stay connected.
Top comments (2)
@sidmohanty11 Very cool project! I typically use the GitHub web UI for syncing, and then pull the changes to my local fork. It's great to see a neat way for syncing locally
Thanks a lot @jeffreythecoder!