Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

For details on the branch structure see:  Branch Structure

Installation


Setup

sg is simply a wrapper around git. Its primary goal is to replicate git commands to multiple folders / repositories within a given parent folder.

The initial clone (pulling down all the source code) can be done with an initial blank directory but requires the repositories csv located at the bottom of the page.

Terminology 

  • Commit: stores the current contents of the index in a new commit along with a log message from the user describing the changes
  • Branch: a pointer to a commit

  • Master: the default name for the first branch

  • HEAD: a pointer to the most recent commit on the current branch

  • Merge: joining two or more commit histories

  • Workspace: the colloquial name for your local copy of a Git repository

  • Working tree: the current branch in your workspace; you see this in git status output all the time

  • Cache: a space intended to temporarily store uncommitted changes

  • Index: the cache where changes are stored before they are committed

  • Tracked and untracked files: files either in the index cache or not yet added to it

  • Stash: another cache, that acts as a stack, where changes can be stored without committing them

  • Origin: the default name for a remote repository

  • Local repository: another term for where you keep your copy of a Git repository on your workstation

  • Remote repository: a secondary copy of a Git repository where you push changes for collaboration or backup

  • Upstream repository: the colloquial term for a remote repository that you track

  • Pull request: a GitHub-specific term to let others know about changes you've pushed to a branch in a repository

  • Merge request: a GitLab-specific term to let others know about changes you've pushed to a branch in a repository

  • 'origin/master': the default setting for a remote repository and its primary branch

Commands

sg clone → Clone all repositories listed in the repositories_git.csv

sg fetch <remote> → Get all the latest changes for all repositories and all branches

sg fetch 

sg pull → Pull changes from remote repositories to your local repositories

Push → Push changes from your local repositories to the remote repositories

Stat → View local changes in your repositories

Out → View outgoing changes in your repositories

Merge <branch> → Pull changes from declared branch into your current branch

Usage

Usage

Example

Description

sg <command>sg pull defaultApply a generic command to all repositories
<tag> <command>sg rs update defaultApply a generic command to all repositories that are tagged with "rs"
"git" <command> sg git push origin prepApply a git command to all git repositories
"some hg command"sg export tipApply a hg command to all HG repositories
<any of the above>sg clone -p 6Do any usage but limiting degree of parallel processes

Available here: sg.zip

Put in the root of your source directory (where hgall use to go)

  • No labels