Skip to content

okwareddevnest/gitok

Repository files navigation

GitOK – GitOK by Dedan Okware

GitOK is a productivity boost for developers. It includes 35+ custom Git commands and functions like commit, pushall, unpush, gitcheatsheet, and now features automatic updates and semantic versioning.

✨ Features

  • 🚀 35+ Git aliases for faster Git workflows
  • 🔄 Auto-update system (gitok --update)
  • 📋 Interactive cheatsheet (gitcheatsheet)
  • 🔒 Safety confirmations for destructive operations
  • 📦 Semantic versioning with automated releases
  • 🛠️ CI/CD pipeline with GitHub Actions
  • 🪟 Cross-platform support (Linux, macOS, Windows WSL, Git Bash)
  • 🐟 Fish Shell support with native fish syntax
  • Zero configuration - works out of the box

📦 Installation

🐧 Linux & macOS

bash <(curl -sL https://raw.githubusercontent.com/okwareddevnest/gitok/main/install.sh)

🐟 Fish Shell Users

The installer automatically detects and configures Fish Shell support. If you're using Fish Shell, the installer will:

  • Download the Fish-compatible version (.gitok.fish)
  • Configure ~/.config/fish/config.fish
  • Use native Fish syntax for all functions

To manually install for Fish Shell:

curl -sL https://raw.githubusercontent.com/okwareddevnest/gitok/main/install.sh | bash

🪟 Windows Users

Option 1: Windows Subsystem for Linux (WSL) - Recommended

# Install WSL if not already installed
wsl --install

# After restart, install GitOK in WSL
wsl bash -c "curl -sL https://raw.githubusercontent.com/okwareddevnest/gitok/main/install.sh | bash"

Option 2: Git Bash (comes with Git for Windows)

  1. Install Git for Windows (includes Git Bash)
  2. Open Git Bash terminal
  3. Run: bash <(curl -sL https://raw.githubusercontent.com/okwareddevnest/gitok/main/install.sh)

Option 3: Automated Windows Installer

# PowerShell (Run as Administrator)
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/okwareddevnest/gitok/main/install-windows.ps1'))

# OR download and double-click
# https://raw.githubusercontent.com/okwareddevnest/gitok/main/install-windows.bat

✅ Verify Installation

# Restart your terminal or run:
source ~/.bashrc  # or source ~/.zshrc

# Test installation
gitok --version
gitcheatsheet

For Fish Shell users:

# Restart your terminal or run:
source ~/.config/fish/config.fish

# Test installation
gitok --version
gitcheatsheet

🔄 Updates

Automatic Updates

gitok --update

Check Version

gitok --version

Get Help

gitok --help
# or
gitcheatsheet

🚀 Quick Start

# Initialize and make first commit
init
commit "Initial commit"

# Create and switch to new branch
branch feature/new-feature
commit "Add new feature"

# Push to all remotes with rebase
pushall

# View commit history
graphlog

# See all available commands
gitcheatsheet

📋 Available Commands

Run gitcheatsheet for a complete list, or see key commands below:

Core Operations

  • commit "message" - Stage all & commit
  • push - Push to current branch
  • pushall - Push to all remotes (with rebase)
  • pull - Pull with rebase
  • status - Git status

Branch Management

  • branch <name> - Create & switch to branch
  • checkout <name> - Switch to branch
  • branches - List all branches
  • deletebranch <name> - Safe delete branch

Advanced Features

  • unpush - Undo last push (⚠️ dangerous)
  • squashlast [N] - Squash last N commits
  • pushall --dry-run - Test push to all remotes
  • makeignore <type> - Create .gitignore template

🛠️ Development

Version Management

Bump version manually:

./scripts/bump-version.sh patch  # 1.0.0 -> 1.0.1
./scripts/bump-version.sh minor  # 1.0.1 -> 1.1.0  
./scripts/bump-version.sh major  # 1.1.0 -> 2.0.0

CI/CD Pipeline

The project uses GitHub Actions for:

  • Automated testing with ShellCheck
  • 🔖 Semantic versioning and releases
  • 🔒 Security scanning
  • 📦 Automated releases on version bumps

Trigger a release:

  1. Use GitHub Actions workflow dispatch
  2. Or commit with [release] in message
  3. Or use the version bump script

📄 License

Apache License - see LICENSE file for details.

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests: shellcheck .gitok.sh
  5. Submit a pull request

📧 Contact

Created by Dedan Okware - softengdedan@gmail.com


Star this repo if GitOK helps boost your Git productivity!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •