git-essentials
Essential Git commands and workflows for version control, branching, and collaboration.
Best use case
git-essentials is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Essential Git commands and workflows for version control, branching, and collaboration.
Teams using git-essentials should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/git-essentials/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How git-essentials Compares
| Feature / Agent | git-essentials | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Essential Git commands and workflows for version control, branching, and collaboration.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# Git Essentials
Essential Git commands for version control and collaboration.
## Initial Setup
```bash
# Configure user
git config --global user.name "Your Name"
git config --global user.email "your@email.com"
# Initialize repository
git init
# Clone repository
git clone https://github.com/user/repo.git
git clone https://github.com/user/repo.git custom-name
```
## Basic Workflow
### Staging and committing
```bash
# Check status
git status
# Add files to staging
git add file.txt
git add .
git add -A # All changes including deletions
# Commit changes
git commit -m "Commit message"
# Add and commit in one step
git commit -am "Message"
# Amend last commit
git commit --amend -m "New message"
git commit --amend --no-edit # Keep message
```
### Viewing changes
```bash
# Show unstaged changes
git diff
# Show staged changes
git diff --staged
# Show changes in specific file
git diff file.txt
# Show changes between commits
git diff commit1 commit2
```
## Branching & Merging
### Branch management
```bash
# List branches
git branch
git branch -a # Include remote branches
# Create branch
git branch feature-name
# Switch branch
git checkout feature-name
git switch feature-name # Modern alternative
# Create and switch
git checkout -b feature-name
git switch -c feature-name
# Delete branch
git branch -d branch-name
git branch -D branch-name # Force delete
# Rename branch
git branch -m old-name new-name
```
### Merging
```bash
# Merge branch into current
git merge feature-name
# Merge with no fast-forward
git merge --no-ff feature-name
# Abort merge
git merge --abort
# Show merge conflicts
git diff --name-only --diff-filter=U
```
## Remote Operations
### Managing remotes
```bash
# List remotes
git remote -v
# Add remote
git remote add origin https://github.com/user/repo.git
# Change remote URL
git remote set-url origin https://github.com/user/new-repo.git
# Remove remote
git remote remove origin
```
### Syncing with remote
```bash
# Fetch from remote
git fetch origin
# Pull changes (fetch + merge)
git pull
# Pull with rebase
git pull --rebase
# Push changes
git push
# Push new branch
git push -u origin branch-name
# Force push (careful!)
git push --force-with-lease
```
## History & Logs
### Viewing history
```bash
# Show commit history
git log
# One line per commit
git log --oneline
# With graph
git log --graph --oneline --all
# Last N commits
git log -5
# Commits by author
git log --author="Name"
# Commits in date range
git log --since="2 weeks ago"
git log --until="2024-01-01"
# File history
git log -- file.txt
```
### Searching history
```bash
# Search commit messages
git log --grep="bug fix"
# Search code changes
git log -S "function_name"
# Show who changed each line
git blame file.txt
# Find commit that introduced bug
git bisect start
git bisect bad
git bisect good commit-hash
```
## Undoing Changes
### Working directory
```bash
# Discard changes in file
git restore file.txt
git checkout -- file.txt # Old way
# Discard all changes
git restore .
```
### Staging area
```bash
# Unstage file
git restore --staged file.txt
git reset HEAD file.txt # Old way
# Unstage all
git reset
```
### Commits
```bash
# Undo last commit (keep changes)
git reset --soft HEAD~1
# Undo last commit (discard changes)
git reset --hard HEAD~1
# Revert commit (create new commit)
git revert commit-hash
# Reset to specific commit
git reset --hard commit-hash
```
## Stashing
```bash
# Stash changes
git stash
# Stash with message
git stash save "Work in progress"
# List stashes
git stash list
# Apply latest stash
git stash apply
# Apply and remove stash
git stash pop
# Apply specific stash
git stash apply stash@{2}
# Delete stash
git stash drop stash@{0}
# Clear all stashes
git stash clear
```
## Rebasing
```bash
# Rebase current branch
git rebase main
# Interactive rebase (last 3 commits)
git rebase -i HEAD~3
# Continue after resolving conflicts
git rebase --continue
# Skip current commit
git rebase --skip
# Abort rebase
git rebase --abort
```
## Tags
```bash
# List tags
git tag
# Create lightweight tag
git tag v1.0.0
# Create annotated tag
git tag -a v1.0.0 -m "Version 1.0.0"
# Tag specific commit
git tag v1.0.0 commit-hash
# Push tag
git push origin v1.0.0
# Push all tags
git push --tags
# Delete tag
git tag -d v1.0.0
git push origin --delete v1.0.0
```
## Advanced Operations
### Cherry-pick
```bash
# Apply specific commit
git cherry-pick commit-hash
# Cherry-pick without committing
git cherry-pick -n commit-hash
```
### Submodules
```bash
# Add submodule
git submodule add https://github.com/user/repo.git path/
# Initialize submodules
git submodule init
# Update submodules
git submodule update
# Clone with submodules
git clone --recursive https://github.com/user/repo.git
```
### Clean
```bash
# Preview files to be deleted
git clean -n
# Delete untracked files
git clean -f
# Delete untracked files and directories
git clean -fd
# Include ignored files
git clean -fdx
```
## Common Workflows
**Feature branch workflow:**
```bash
git checkout -b feature/new-feature
# Make changes
git add .
git commit -m "Add new feature"
git push -u origin feature/new-feature
# Create PR, then after merge:
git checkout main
git pull
git branch -d feature/new-feature
```
**Hotfix workflow:**
```bash
git checkout main
git pull
git checkout -b hotfix/critical-bug
# Fix bug
git commit -am "Fix critical bug"
git push -u origin hotfix/critical-bug
# After merge:
git checkout main && git pull
```
**Syncing fork:**
```bash
git remote add upstream https://github.com/original/repo.git
git fetch upstream
git checkout main
git merge upstream/main
git push origin main
```
## Useful Aliases
Add to `~/.gitconfig`:
```ini
[alias]
st = status
co = checkout
br = branch
ci = commit
unstage = reset HEAD --
last = log -1 HEAD
visual = log --graph --oneline --all
amend = commit --amend --no-edit
```
## Tips
- Commit often, perfect later (interactive rebase)
- Write meaningful commit messages
- Use `.gitignore` for files to exclude
- Never force push to shared branches
- Pull before starting work
- Use feature branches, not main
- Rebase feature branches before merging
- Use `--force-with-lease` instead of `--force`
## Common Issues
**Undo accidental commit:**
```bash
git reset --soft HEAD~1
```
**Recover deleted branch:**
```bash
git reflog
git checkout -b branch-name <commit-hash>
```
**Fix wrong commit message:**
```bash
git commit --amend -m "Correct message"
```
**Resolve merge conflicts:**
```bash
# Edit files to resolve conflicts
git add resolved-files
git commit # Or git merge --continue
```
## Documentation
Official docs: https://git-scm.com/doc
Pro Git book: https://git-scm.com/book
Visual Git guide: https://marklodato.github.io/visual-git-guide/Related Skills
OPC Essentials
A premium operating system skill for one-person companies covering triage, pipeline, sales calls, proposals, follow-ups, renewals, cash collection, weekly and monthly reviews, and practical solo-founder decisions.
ssh-essentials
Essential SSH commands for secure remote access, key management, tunneling, and file transfers.
docker-essentials
Essential Docker commands and workflows for container management, image operations, and debugging.
doro-git-essentials
Essential Git commands and workflows for version control, branching, and collaboration.
doro-docker-essentials
Essential Docker commands and workflows for container management, image operations, and debugging.
---
name: article-factory-wechat
humanizer
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.
find-skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
tavily-search
Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.
baidu-search
Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.
agent-autonomy-kit
Stop waiting for prompts. Keep working.
Meeting Prep
Never walk into a meeting unprepared again. Your agent researches all attendees before calendar events—pulling LinkedIn profiles, recent company news, mutual connections, and conversation starters. Generates a briefing doc with talking points, icebreakers, and context so you show up informed and confident. Triggered automatically before meetings or on-demand. Configure research depth, advance timing, and output format. Walking into meetings blind is amateur hour—missed connections, generic small talk, zero leverage. Use when setting up meeting intelligence, researching specific attendees, generating pre-meeting briefs, or automating your prep workflow.