### Example .projects.gws Format Source: https://github.com/streakycobra/gws/blob/master/README.md The `.projects.gws` file lists projects, their repository URLs, and optionally an upstream URL. The upstream URL is mapped as a Git remote named `upstream`. ```plaintext work/theSoftware | git@github.com:You/theSoftware.git perso/gws | git@github.com:You/gws.git | git@github.com:StreakyCobra/gws.git ``` -------------------------------- ### Example .gitignore Content Source: https://github.com/streakycobra/gws/blob/master/README.md This `.gitignore` file is used in conjunction with `.projects.gws` to manage Git repositories within a workspace. It ignores all files by default, except for the configuration files themselves. ```gitignore # Ignore everything, so all repositories in our case * # But not these files !.projects.gws !.gitignore ``` -------------------------------- ### Example .ignore.gws Format Source: https://github.com/streakycobra/gws/blob/master/README.md The `.ignore.gws` file contains regular expressions to exclude specific projects from gws operations. For example, to disable work-related projects on a home computer. ```plaintext ^work/ ``` -------------------------------- ### Initialize Workspace with gws Source: https://github.com/streakycobra/gws/blob/master/README.md The `gws init` command scans the current directory for existing Git repositories and creates a `.projects.gws` file to manage them. This is useful for setting up gws in an existing project structure. ```bash $ gws init ``` -------------------------------- ### Configure Projects with .projects.gws Source: https://github.com/streakycobra/gws/blob/master/README.md The `.projects.gws` file defines your projects. Each line specifies a folder path and its associated remote Git URLs and names. Remote names default to 'origin' and 'upstream' if not specified. ```git | [ | [ | ... ]] ``` -------------------------------- ### Clone Specific Project with gws Source: https://github.com/streakycobra/gws/blob/master/README.md Use `gws clone ` to clone a specific repository from the `.projects.gws` list. This is helpful when you only need to add a subset of your projects to the workspace. ```bash $ gws clone work/theSoftware ``` -------------------------------- ### gws .projects.gws File Syntax Source: https://github.com/streakycobra/gws/blob/master/README.md This bash snippet shows the syntax for defining projects in the .projects.gws file. Each line specifies a local path for the repository and its corresponding Git URL, separated by a pipe symbol '|'. This file is used by gws to manage workspace repositories. ```bash # Work related work/tools/q | https://github.com/harelba/q.git # Other contrib/gws | https://github.com/StreakyCobra/gws.git contrib/peru | https://github.com/buildinspace/peru ``` -------------------------------- ### Customize Theme with theme.gws Source: https://github.com/streakycobra/gws/blob/master/README.md You can customize the color scheme of gws by creating a shell script named `theme.gws` in specific locations. The first existing file in the order `./.git/theme.gws`, `${HOME}/.theme.gws`, or `${HOME}/.config/gws/theme` will be sourced. ```bash # Example theme file content: # C_RED="\033[0;31m" # C_NC="\033[0m" ``` -------------------------------- ### Fetch Changes with gws Source: https://github.com/streakycobra/gws/blob/master/README.md The `gws fetch` command retrieves the latest changes from the `origin` remote for all repositories in the workspace. This is useful for updating your local repository information before working offline. The `--only-changes` option limits output to repositories that had changes fetched. ```bash $ gws fetch $ gws fetch --only-changes ``` -------------------------------- ### gws PATH Configuration for Other Linux Source: https://github.com/streakycobra/gws/blob/master/README.md This bash snippet demonstrates how to add a directory containing the 'gws' script to the system's PATH environment variable. This ensures that the 'gws' command can be executed from any location in the terminal. It's typically added to the ~/.bashrc file. ```bash export PATH="$PATH:/path/to/scripts/dir" ``` -------------------------------- ### Fast-Forward Pull with gws Source: https://github.com/streakycobra/gws/blob/master/README.md The `gws ff` command performs a fast-forward pull for all repositories, merging changes from the `origin` remote. Similar to `gws fetch`, the `--only-changes` option can be used to filter the output. ```bash $ gws ff $ gws ff --only-changes ``` -------------------------------- ### Check Workspace Consistency with gws Source: https://github.com/streakycobra/gws/blob/master/README.md The `gws check` command is used to verify the consistency of your Git workspace. It searches recursively for all Git projects and performs checks. ```bash $ gws check ``` -------------------------------- ### Update Workspace with gws Source: https://github.com/streakycobra/gws/blob/master/README.md The `gws update` command clones any missing repositories listed in `.projects.gws`. It ensures that all projects defined in the configuration file are present in the workspace. The `--only-changes` option can be used to only show repositories that were actually updated. ```bash $ gws update $ gws update --only-changes ``` -------------------------------- ### Ignore Projects with .ignore.gws Source: https://github.com/streakycobra/gws/blob/master/README.md The `.ignore.gws` file uses regular expressions to specify projects that should be ignored by gws. This is useful for excluding projects that are not needed or accessible locally. ```regex ^work/ ``` ```regex -work$ ``` ```regex a ``` -------------------------------- ### gws macOS Alias Configuration Source: https://github.com/streakycobra/gws/blob/master/README.md This bash snippet configures an alias for the 'gws' command on macOS. It prepends directories containing GNU sed and coreutils to the PATH to work around a bug in version 0.1.8 of gws, which relies on GNU-specific sed and cut options not available in default macOS versions. ```bash alias gws="PATH=/usr/local/opt/coreutils/libexec/gnubin:usr/local/opt/gnu-sed/libexec/gnubin:$PATH gws" ``` -------------------------------- ### Check Workspace Integrity with gws Source: https://github.com/streakycobra/gws/blob/master/README.md The `gws check` command verifies the workspace by identifying known, unknown, ignored, and missing repositories. This command can be slow for very large repositories. ```bash $ gws check ``` -------------------------------- ### Check Workspace Status with gws Source: https://github.com/streakycobra/gws/blob/master/README.md The `gws status` (or simply `gws`) command monitors all listed repositories for uncommitted changes, untracked files, and branches not synced with the origin. The `--only-changes` option filters the output to show only repositories with modifications. ```bash $ gws status $ gws $ gws status --only-changes ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.