Posts Project Sync
Post
Cancel

Project Sync

TL; DR

I needed a tool to allow me to manage local Azure Git directories from the Terminal. So, I built it and am sharing it.


.NET Core License

What is Project Sync

This is a tool born out of need. My team works in an extensive Azure DevOps Repository, and I have a need to keep my working repository list to a minimum. Which means, I find myself deleting repositories, and then looking for them again in a month. The constant back and forth, between browser/mouse, to terminal was driving me crazy. I wanted to access the azure repositories from the command line. So, I built a tool to enable cloning, fetching of all local repositories, and deleting of local repositories. This tool improves my daily developer life significantly. Which is why I am writing about it.

Fetch

ProjectSync will only fetch repositories it was used is configured to manage. However, it will, fetch all repositories it is managing. I use this feature every morning, and after lunch.

1
ProjectSync

Clone

ProjectSync is intelligent enough to recognize when a repository you are trying to clone exists on the disk already. If that is the case, it will configure itself to manage that repository, but instead of doing a clone, it will fetch.

Search All Repositories

The most basic way to clone with ProjectSync is to browse all repositories selecting the ones you want. And let it clone them.

1
ProjectSync --add

This will then show you an alphabetized list broken up into pages. You can select which projects you want to clone by hitting spacebar. After each page, you will be given the chance to approve your selection, and then shown the next page. When the whole thing is done, you will be able to confirm all your selections.

Search for Specific Repositories

If you already know what you are looking for, you can enter regex to limit the repositories to choose from.

Note
Repository regex is case sensitive.
1
ProjectSync --ins [Mm]y-[Rr]epository

The above command will search for all repositories with “my-repository”, “My-repository”, “my-Repository”, or “My-Repository” in their name. Again you can select each of the repositories you want to clone by highlighting them and hitting space bar. This view is also paged.

Contributors to Project Sync✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

This post is licensed under CC BY 4.0 by the author.