π οΈ A collection of powerful CLI tools and scripts for streamlined Git workflow, repository management, and shell productivity.
Git-Control is a comprehensive toolkit designed to enhance your Git and shell workflow. It provides:
- Alias Management: Interactive setup of productivity-boosting shell aliases
- Template Loading: Quick initialisation of new repositories with standardised templates
- Module Nesting: Automated management of Git submodules in complex project hierarchies
- Workflow Templates: Pre-configured GitHub Actions for common automation tasks
Managing multiple repositories, nested submodules, and maintaining consistent configurations across projects is time-consuming and error-prone. Git-Control automates these tasks while remaining portable and easy to share across systems.
- π Interactive Alias Installer - Dynamically detects script paths and creates portable aliases
- π§ Template System - Initialise repos with docs, workflows, and configuration templates
- π¦ Submodule Management - Auto-generate and maintain
.gitmodulesfor nested repos - π Safety Aliases - Protective wrappers for dangerous commands (
rm,mv,cp) - β‘ Git Shortcuts - Optimised aliases for common Git operations
- π³ Container Shortcuts - Quick access to Docker/Podman commands
- π Network Utilities - IP checking, port monitoring, and connectivity tools
- π Directory Operations - Enhanced navigation and file management
- Bash 4.0+ or Zsh
- Git 2.0+
- Standard Unix utilities (
find,sed,grep)
# Clone the repository
git clone https://github.com/xaoscience/git-control.git
cd git-control
# Run the interactive alias installer
./scripts/alias-loading.sh
# Or run individual scripts
./scripts/template-loading.sh
./scripts/module-nesting.sh# Add to your .bashrc or .bash_profile
source /path/to/git-control/scripts/alias-loading.sh --source-only# Interactive installation - choose which alias categories to install
./scripts/alias-loading.sh
# Categories available:
# 1. Git Control (gc-*) - git-control specific commands
# 2. Git Shortcuts - gs, ga, gc, gp, gl, etc.
# 3. Safety Nets - rm -i, cp -i, mv -i
# 4. System Monitoring - ports, meminfo, disk
# 5. Directory Operations - md, rd
# 6. Network Utilities - myip, ping, fastping
# 7. Container Shortcuts - dps, dpsa, drm, drmi
# 8. Quick Edits - bashrc, reloadAllows for creation of new $NAME-templates folders, which will be copied by default.
# Interactive mode - initialise a new repo with templates
gc-init
# Or run directly
./scripts/template-loading.sh
# CLI mode - update specific files with path support
./scripts/template-loading.sh -f docs/CONTRIBUTING.md,docs/SECURITY.md -o
# CLI options:
# -f, --files FILE1,FILE2 Process specific files (supports paths like docs/FILE.md)
# -o, --overwrite Overwrite existing files without prompting
# -h, --help Show help and list available templates# Interactive creation of new GitHub repository
gc-create
# Or run directly
./scripts/create-repo.sh# Interactive creation of pull request from current branch
gc-pr
# Or run directly
./scripts/create-pr.sh# Scan current directory for git repos and generate .gitmodules
gc-modules
# Or run directly
./scripts/module-nesting.sh
# Specify a custom root directory
./scripts/module-nesting.sh /path/to/project| Script | Description |
|---|---|
alias-loading.sh |
Interactive alias installer with category selection |
template-loading.sh |
Repository template initialisation tool |
create-repo.sh |
Interactive GitHub repository creator |
create-pr.sh |
Interactive pull request creator |
module-nesting.sh |
Automated .gitmodules generator for nested repos |
| Template | Description |
|---|---|
README.md |
Full-featured README with badges and sections |
CONTRIBUTING.md |
Contribution guidelines template |
CODE_OF_CONDUCT.md |
Community code of conduct |
SECURITY.md |
Security policy template |
| Template | Description |
|---|---|
Apache License 2.0 |
Permissive with explicit patent grant and NOTICE handling |
BSD 3-Clause |
Permissive license with non-endorsement clause |
GNU GPL v3.0 |
Strong copyleft β modifications must be released under GPLv3 |
MIT License |
Very permissive, minimal requirements |
| Template | Description |
|---|---|
ISSUE_TEMPLATE/bug_report.md |
Bug report issue template |
ISSUE_TEMPLATE/feature_request.md |
Feature request issue template |
PULL_REQUEST_TEMPLATE.md |
Pull request template |
| Workflow | Description |
|---|---|
dependabot-automerge.yml |
Auto-merge Dependabot PRs |
init.yml |
Standalone workflow - copy to any repo |
remote-init.yml |
Calls the reusable workflow remotely |
| Workflow | Description |
|---|---|
central-loader.yml |
Reusable workflow (call from other repos) |
Git-Control provides two ways to initialise templates via GitHub Actions:
Copy workflows-templates/init.yml to your repo's .github/workflows/ folder.
# From your target repository
mkdir -p .github/workflows
curl -sL https://raw.githubusercontent.com/xaoscience/git-control/main/workflows-templates/init.yml \
-o .github/workflows/init.yml
git add .github/workflows/init.yml
git commit -m "Add template initialisation workflow"
git pushThen go to Actions β Initialise Repository Templates β Run workflow
Copy workflows-templates/remote-init.yml or call git-control's reusable workflow directly:
# .github/workflows/remote-init.yml
name: Initialise Documentation
on:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
init-templates:
uses: xaoscience/git-control/.github/workflows/central-loader.yml@main
with:
project_name: 'My Project'
short_description: 'A cool project'
license_type: 'MIT'
stability: 'experimental'
templates: 'all'
create_pr: true- β
No PAT required - Uses standard
GITHUB_TOKEN - β Creates PR by default - Review before merging
- β Configurable - Choose templates, license, stability
- β Auto-populates - Fills in repo name, org, URLs automatically
- β
Dynamic folders - Scans all
*-templatesfolders for future expansion
| Document | Description |
|---|---|
| π README | This file - project overview |
| π€ Contributing | How to contribute |
| π Code of Conduct | Community guidelines |
| π Security | Security policy |
Contributions are welcome! Please read our Contributing Guidelines before submitting PRs.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
See also: Code of Conduct | Security Policy
- Core alias loading script with interactive selection
- Template system for repository documentation
- Submodule nesting management
- Dependabot automerge workflow
- GitHub Actions workflow for remote template initialisation
- Reusable workflow for cross-repo template loading
- Zsh compatibility layer
- Fish shell support
- GUI wrapper (optional)
- Plugin system for custom alias categories
- Config file support for persistent preferences
See the open issues for a full list of proposed features and known issues.
- π» Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
Distributed under the GPL-3.0 License. See LICENSE for more information.