A powerful Git workflow automation tool with semantic commits, Gitmoji support, automatic changelog management, and advanced features.
Author: Christian BenΓtez
- π Project Initialization:
gf -i - πΏ Branch Management:
- Create feature branches:
gf -s -f feature-name - Create hotfix branches:
gf -s -h hotfix-name - Create bugfix branches:
gf -s -b bugfix-name - Create release branches:
gf -s -r release-name
- Create feature branches:
- πΎ Smart Commits:
- Auto-generated semantic commit messages with file count
- Gitmoji support
- Detailed file change tracking (new, modified, deleted, renamed)
- English commit messages with GitLab user attribution
- π¦ Staging Changes:
gf -aorgf -a file1 file2 - π€ Push & Create MR/PR:
gf -p "commit message" - π Merge Handling:
gf -m - ποΈ Branch Cleanup:
gf -f - π Cross-branch MR Creation (GitLab):
gf -r source target - π Advanced CHANGELOG.md Management:
- Automatic generation and updates
- Monthly rotation and archiving
- Auto-cleanup of old archives (6+ months)
- Enhanced format with user attribution
# Method 1: Direct download
curl -o gf https://raw.githubusercontent.com/chrisatdev/gf/main/gf
chmod +x gf
sudo mv gf /usr/local/bin/
# Method 2: Using wget
wget https://raw.githubusercontent.com/chrisatdev/gf/main/gf -O gf
chmod +x gf
sudo mv gf /usr/local/bin/# Download and install
curl -o gf https://raw.githubusercontent.com/chrisatdev/gf/main/gf
chmod +x gf
sudo mv gf /usr/local/bin/
# Alternative: Install to user directory
mkdir -p ~/.local/bin
mv gf ~/.local/bin/
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc# Method 1: Using curl
curl -o gf https://raw.githubusercontent.com/chrisatdev/gf/main/gf
chmod +x gf
sudo mv gf /usr/local/bin/
# Method 2: Using Homebrew
brew install chrisatdev/tap/gf
# Method 3: Install to user directory
mkdir -p ~/bin
mv gf ~/bin/
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc # or ~/.bash_profile
source ~/.zshrc # or source ~/.bash_profilegf -hYou should see the help message with version 1.3.0.
gf -i# Feature branch
gf -s -f awesome-feature
# Hotfix branch
gf -s -h critical-bug-fix
# Bugfix branch
gf -s -b login-issue
# Release branch
gf -s -r v2.1.0# Stage all changes
gf -a
# Stage specific files
gf -a src/app.js package.json# Auto-generated semantic message with file count and details
gf -p
# Custom message (gitmoji added automatically)
gf -p "feat: add new payment processor"Example auto-generated commit:
β¨ feat: add new features (3 files)
Changes: 2 new, 1 modified
**New files:**
- src/components/PaymentForm.tsx
- src/utils/payment.ts
**Modified files:**
- package.json
# Merge main into current branch
gf -m
# Delete current branch and return to main
gf -f# Create MR from current branch to main
gf -p "feat: new feature" # Automatically opens MR
# Create MR between specific branches
gf -r feature/payment mainAutomatically adds appropriate emojis based on commit type:
| Type | Emoji | Description |
|---|---|---|
| feat | β¨ | New feature |
| fix | π | Bug fix |
| docs | π | Documentation |
| style | π | Code style |
| refactor | β»οΈ | Refactoring |
| test | β | Testing |
| chore | π§ | Maintenance |
| build | π· | Build system |
| ci | βοΈ | CI configuration |
| perf | β‘ | Performance improvements |
| revert | βͺ | Revert changes |
- Monthly Rotation: Automatically archives changelogs from previous months
- Smart Archiving: Creates
changelogs/directory and archives with formatCHANGELOG-YYYY-MM.md - Auto-cleanup: Removes changelog archives older than 6 months
- Enhanced Format: Includes GitLab user attribution
project/
βββ CHANGELOG.md # Current month
βββ changelogs/ # Historical archives
β βββ CHANGELOG-2024-07.md # July 2024
β βββ CHANGELOG-2024-08.md # August 2024
βββ ...
# CHANGELOG
## [Unreleased] - September 2024
### Added
- [feat] add new payment processor (3 files) by @yourusername
- [feat] implement user authentication service (5 files) by @yourusername
### Fixed
- [fix] resolve login timeout issue (2 files) by @yourusername
### Documentation
- [docs] update API documentation (1 file) by @yourusername- Script detects if current
CHANGELOG.mdis from previous month - Archives automatically to
changelogs/CHANGELOG-YYYY-MM.md - Creates new
CHANGELOG.mdfor current month - Cleans up archives older than 6 months
# 1. Create feature branch
gf -s -f user-profile
# 2. Make changes, then stage
gf -a
# 3. Commit and push (opens MR automatically)
gf -p
# 4. Merge main updates if needed
gf -m
# 5. When done, cleanup branch
gf -f# 1. Create hotfix branch
gf -s -h critical-security-fix
# 2. Make fixes, stage and commit
gf -a
gf -p "fix: resolve security vulnerability in auth"
# 3. Cleanup
gf -f- Bash: 5.0+
- Git: 2.20+
- System: Linux/macOS
- Remote: GitLab or GitHub repository
- Optional:
xdg-open(Linux) oropen(macOS) for automatic MR/PR opening
The script automatically detects:
- GitLab username from git config or remote URL
- Repository type (GitLab/GitHub) for MR/PR creation
- Operating system for proper date handling
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"Permission denied:
chmod +x gfCommand not found:
# Ensure the binary is in your PATH
echo $PATH
which gfDate command issues (macOS):
# Install GNU coreutils if needed
brew install coreutilsMIT License - Copyright (c) 2025 Christian BenΓtez
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
Repository: https://github.com/chrisatdev/gf
- Fork the repository
- Create a feature branch:
gf -s -f new-feature - Make changes and test thoroughly
- Submit a pull request
- v1.3.0: Monthly changelog rotation, enhanced commit messages, auto-cleanup
- v1.2.0: Improved changelog format, GitLab user attribution
- v1.1.2: Enhanced semantic commits and Gitmoji support
- v1.0.0: Initial release with basic Git workflow automation
Made with β€οΈ by Christian BenΓtez