Skip to content

Makes sure all git repos have the correct remotes and are pushed

License

Notifications You must be signed in to change notification settings

silentorbit/SilentGitSync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitSync

Makes sure all your git repos are fully pushed to the right location

  • Scan for all git repos
  • Add/update remote paths
  • Push new changes

Usage

Install NuGet package: SilentOrbit.SilentGitSync

//Config in code
var config = new SyncConfig();

//Source repos
config.Repo.Add(new RepoConfig
{
    Path = @"C:\MyRepos",
    Remote = new List<string> { "github", "external" }
});

//Target repo
config.AddRemote("external", @"E:\Git\");

//Target repo with custom remote for some repos
var github = config.AddRemote("github", @"git@github.com:myaccount/");
github.AddAlias("SilentDisk", "git@github.com:silentorbit/SilentDisk.git");
github.AddAlias("SilentGitSync", "git@github.com:silentorbit/SilentGitSync.git");

//Start the sync
var scanner = new Scanner(config);
scanner.RunAllRemotes();

About

Makes sure all git repos have the correct remotes and are pushed

Resources

License

Stars

Watchers

Forks

Languages