← Back to Skills Marketplace
mbright4497

Git Essentials 1.0.0

by mbright4497 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
198
Downloads
0
Stars
9
Active Installs
1
Versions
Install in OpenClaw
/install git-essentials-1-0-0
Description
Essential Git commands and workflows for version control, branching, and collaboration.
README (SKILL.md)

Git Essentials

Essential Git commands for version control and collaboration.

Initial Setup

# Configure user
git config --global user.name "Your Name"
git config --global user.email "[email protected]"

# 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

# 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

# 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

# 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

# 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

# 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

# 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

# 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

# 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

# Discard changes in file
git restore file.txt
git checkout -- file.txt  # Old way

# Discard all changes
git restore .

Staging area

# Unstage file
git restore --staged file.txt
git reset HEAD file.txt  # Old way

# Unstage all
git reset

Commits

# 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

# 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

# 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

# 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

# Apply specific commit
git cherry-pick commit-hash

# Cherry-pick without committing
git cherry-pick -n commit-hash

Submodules

# 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

# 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:

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:

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:

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:

[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:

git reset --soft HEAD~1

Recover deleted branch:

git reflog
git checkout -b branch-name \x3Ccommit-hash>

Fix wrong commit message:

git commit --amend -m "Correct message"

Resolve merge conflicts:

# 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/

Usage Guidance
This skill is essentially a Git cheatsheet and appears coherent with that purpose. Before using it: 1) verify the publisher (the _meta.json ownerId does not match the submission owner ID in the provided metadata), 2) don't run destructive commands (git reset --hard, git clean -fdx, force-push) in repositories you care about — test in a disposable clone, 3) be aware git config --global edits ~/.gitconfig (personal info), and 4) because the source is listed as unknown, prefer to run commands manually rather than letting any automated agent execute them autonomously until you confirm the skill's provenance.
Capability Analysis
Type: OpenClaw Skill Name: git-essentials-1-0-0 Version: 1.0.0 The skill bundle 'git-essentials' is a standard documentation and reference guide for Git commands and workflows. It contains no executable scripts, malicious instructions, or evidence of data exfiltration, and its content is entirely consistent with its stated purpose in SKILL.md.
Capability Assessment
Purpose & Capability
The skill is an instruction-only Git reference and only requires the 'git' binary, which matches the stated purpose. One inconsistency: the _meta.json ownerId value differs from the registry owner ID shown in the submission metadata — this is a metadata mismatch (not directly harmful) but worth verifying the publisher.
Instruction Scope
SKILL.md contains only Git commands and workflows appropriate for a Git cheat-sheet. It does instruct global configuration (git config --global) and adding aliases to ~/.gitconfig, which will modify your user config (expected). It also documents destructive operations (git reset --hard, git clean -fdx, force pushes) — these are normal for Git guidance but require care before executing.
Install Mechanism
No install spec and no code files — instruction-only skill. This has minimal installation risk (nothing is downloaded or written by the skill itself).
Credentials
The skill requests no environment variables, credentials, or unrelated config paths. The required binary is only 'git', which is proportional to the stated functionality.
Persistence & Privilege
always is false and the skill is user-invocable; it does not request persistent or elevated platform privileges. Autonomous invocation is allowed by default (normal for skills) but not combined with other red flags here.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install git-essentials-1-0-0
  3. After installation, invoke the skill by name or use /git-essentials-1-0-0
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of git-essentials, providing a comprehensive guide to essential Git commands and workflows. - Covers repository initialization, configuration, and cloning basics. - Step-by-step instructions for staging, committing, branching, merging, and rebasing. - Includes advanced operations: cherry-picking, submodules, cleaning, and stashing. - Lists common workflows for features, hotfixes, and syncing forks. - Provides useful Git aliases and troubleshooting tips. - Offers links to official documentation and helpful Git resources.
Metadata
Slug git-essentials-1-0-0
Version 1.0.0
License MIT-0
All-time Installs 9
Active Installs 9
Total Versions 1
Frequently Asked Questions

What is Git Essentials 1.0.0?

Essential Git commands and workflows for version control, branching, and collaboration. It is an AI Agent Skill for Claude Code / OpenClaw, with 198 downloads so far.

How do I install Git Essentials 1.0.0?

Run "/install git-essentials-1-0-0" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Git Essentials 1.0.0 free?

Yes, Git Essentials 1.0.0 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Git Essentials 1.0.0 support?

Git Essentials 1.0.0 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Git Essentials 1.0.0?

It is built and maintained by mbright4497 (@mbright4497); the current version is v1.0.0.

💬 Comments