| name | git-manager |
| description | Comprehensive Git operations for repository management. Use when working with Git repositories for:
- Committing changes (git commit with conventional commits format)
- Creating branches (feature, bugfix, hotfix branches)
- Stashing changes
- Viewing history, diffs, and status
- Merging and rebasing
- Creating pull requests (GitHub, GitLab)
- Undoing commits and changes
- Syncing with remote (push, pull, fetch)
|
Git Manager
Quick Commands
Status & Info
git status
git status -s
git log --oneline
git log --graph
git diff
git diff --cached
Committing
git add <files>
git add .
git commit -m "feat: add new feature"
git commit -m "fix: resolve login bug"
git commit -m "docs: update README"
git commit --amend
Branching
git branch -a
git checkout -b feature/name
git checkout main
git branch -d feature/name
Sync
git fetch
git pull
git push
git push -u origin branch
Stashing
git stash
git stash list
git stash pop
Conventional Commits
Follow these prefixes:
feat: - New feature
fix: - Bug fix
docs: - Documentation only
style: - Formatting, no code change
refactor: - Code restructure
test: - Adding tests
chore: - Maintenance
Pull Request Workflow
- Create branch:
feature/short-description
- Make changes and commit
- Push:
git push -u origin feature/short-description
- Create PR from remote URL
Undo Operations
| Action | Command |
|---|
| Unstage file | git reset HEAD <file> |
| Undo commit (keep changes) | git reset --soft HEAD~1 |
| Undo commit (discard changes) | git reset --hard HEAD~1 |
| Revert commit | git revert <commit-hash> |