A Developer Experience Tool to Keep Git local Repositories Updated 😎
Collaborative Software Development: In software development teams, multiple members may work on a shared project. Keeping local repositories updated ensures that everyone is working with the latest version of the code and reduces integration conflicts.
Frontend and Backend Integration: In a local integration environment, a frontend developer needs to keep their local repository updated with the latest changes from the develop backend API, which is being developed by a teammate, to ensure smooth integration.
Feel free to use the gitfresh tool for other scenarios as well!
Gitfresh is available for MacOS and Linux via Homebrew.
First, you should install HomeBrew.
Then, run the following command:
brew install apolo96/tap/gitfresh
Check installation:
gitfresh version
For Windows via Scoop:
scoop bucket add gitfresh https://github.com/apolo96/scoop-bucket.git
scoop install gitfresh
GitFresh is a tool powered by Github and Ngrok.
I hope to add support to other git server providers in the future.
- Github Token
- Ngrok Token
You can go to Github to create a new token with admin:repo_hook
scope:
https://github.com/settings/tokens
You can go to Ngrok to get a personal token:
https://dashboard.ngrok.com/get-started/your-authtoken
After installing GitFresh via Homebrew and getting GitHub and Ngrok tokens, then you can initialize a workspace:
First, go to the working directory that contains your Git repositories and run the following command:
gitfresh config
It opens the CLI Form where you should enter the GitHub and Ngrok tokens.
The TunnelDomain input is OPTIONAL, by default Ngrok generates a random DNS.
If you prefer, you can create a custom domain at: https://dashboard.ngrok.com/cloud-edge/domains.
Finally, run the following command:
gitfresh init
This command can take some seconds for startup services.
You can add new repositories to Gitfresh. Running the following command:
gitfresh scan
gitfresh -help
GitFresh creates GitHub webhooks to send notifications of events git-push through an internet tunnel provided by Ngrok that triggers repository updates on the local machine (gitfresh agent)