syncrepo

command module
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2022 License: MIT Imports: 10 Imported by: 0

README

Syncrepo

syncrepo synchronizes all the repositories in a given path

Given a path it runs git pull --all command in all the repositories. It uses sync.WaitGroup to runs these commands parallely.

Installation

go install github.com/AbhinavAchha/syncrepo@latest

Usage

Pull All Repositories in given Path

syncrepo --path path/to/the/directory

Get List of Repositories and Save it to given File

syncrepo --list path --file repolist.txt

Export List of Repositories (JSON Only)

syncrepo --export --path path --file repos.json

Import List if Repositories (JSON Only)

syncrepo --import --path path/to/import --file repos.json

Currently only JSON files importing and exporting are supported

Documentation

Overview

Package main provides main command. It is used to sync all the git repositories in a directory with their remote repositories. It uses the 'find' command to get all the directories in the path specified by the user. It then runs the 'git -C pull --all' command in each directory. It also provides the option to save the list of git repositories to a file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL