git-helper
Skill4 starsChanged 5 months agoMITView on GitHub
Common git commands, workflows, and troubleshooting for everyday development
- Deletes or force-pushes
- Commits and pushes
3 other projects use a version of this.
Adopted by
Most recently taken up by
- OpenxIntelligence/Coding-Agent-Skillstheir own version, first seen Nov 1, 2026
- I-Onlabs/claude-code-skillstheir own version, first seen Oct 25, 2026
- onlyoneaman/agent-skillstheir own version, first seen Dec 23, 2025
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- onlyoneaman/agent-skills★ 10same name
- I-Onlabs/claude-code-skills★ 4same name
- OpenxIntelligence/Coding-Agent-Skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- bet-journalSkill
- clv-journalSkill
- crypto-priceSkill
- data-vizSkill
- devin-integrationSkill
- dfs-optimizerSkill
- judge-auditSkill
- kelly-criterionSkill
- market-sentimentSkill
- nft-trackerSkill
- portfolio-rebalancerSkill
- screenshot-annotatorSkill
- security-scannerSkill
- sports-oddsSkill
- streak-trackerSkill
- weather-forecastSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 38
Follow conventional commits for clean history:
- Distinctive: line 283
Always pull before starting new work
- Distinctive: line 284
Commit early and often
- Distinctive: line 285
Write meaningful commit messages
- Distinctive: line 286
Use branches for features/fixes
- Distinctive: line 287
Never force push to shared branches
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Git Helper
Quick reference for common git operations, workflows, and fixes.
Daily Workflow
# Start your day - pull latest changes
git pull origin main
# Create feature branch
git checkout -b feature/my-new-feature
# Stage and commit changes
git add -A
git commit -m "feat: add new feature"
# Push to remote
git push origin feature/my-new-featureCommit Message Convention
Follow conventional commits for clean history:
# Format: type(scope): description
git commit -m "feat: add user authentication"
git commit -m "fix: resolve login redirect bug"
git commit -m "docs: update API documentation"
git commit -m "style: format code with prettier"
git commit -m "refactor: simplify database queries"
git commit -m "test: add unit tests for auth module"
git commit -m "chore: update dependencies"Undo Mistakes
# Undo last commit (keep changes staged)
git reset --soft HEAD~1
# Undo last commit (keep changes unstaged)
git reset HEAD~1
# Discard all local changes
git checkout -- .
# Discard changes to specific file
git checkout -- path/to/file
# Undo a pushed commit (creates new commit)
git revert HEAD
# Amend last commit message
git commit --amend -m "new message"Branch Management
# List all branches
git branch -a
# Delete local branch
git branch -d branch-name
# Delete remote branch
git push origin --delete branch-name
# Rename current branch
git branch -m new-name
# Switch to previous branch
git checkout -
# Create branch from specific commit
git checkout -b new-branch abc1234Stashing
# Stash current changes
git stash
# Stash with message
git stash push -m "work in progress on feature X"
# List stashes
git stash list
# Apply most recent stash
git stash pop
# Apply specific stash
git stash apply stash@{2}
# Drop a stash
git stash drop stash@{0}Viewing History
# Pretty log
git log --oneline --graph --decorate -20
# Log with stats
git log --stat -5
# Search commits by message
git log --grep="bug fix"
# Show commits by author
git log --author="Ian"
# Show changes in commit
git show abc1234
# Blame a file (who changed what)
git blame path/to/fileMerging & Rebasing
# Merge branch into current
git merge feature-branch
# Rebase onto main (cleaner history)
git rebase main
# Interactive rebase (squash commits)
git rebase -i HEAD~3
# Abort a merge/rebase
git merge --abort
git rebase --abort
# Continue after resolving conflicts
git rebase --continueWorking with Remotes
# List remotes
git remote -v
# Add remote
git remote add upstream https://github.com/openclaw/openclaw.git
# Fetch from all remotes
git fetch --all
# Pull from upstream
git pull upstream main
# Push to different remote
git push upstream feature-branchCherry Pick
# Apply specific commit to current branch
git cherry-pick abc1234
# Cherry pick without committing
git cherry-pick -n abc1234
# Cherry pick range of commits
git cherry-pick abc1234..def5678Clean Up
# Remove untracked files (dry run)
git clean -n
# Remove untracked files
git clean -f
# Remove untracked files and directories
git clean -fd
# Prune remote tracking branches
git remote prune origin
# Garbage collect
git gcDiff & Compare
# Show unstaged changes
git diff
# Show staged changes
git diff --staged
# Compare branches
git diff main..feature-branch
# Compare with remote
git diff origin/main
# Show changed files only
git diff --name-onlyTags
# Create tag
git tag v1.0.0
# Create annotated tag
git tag -a v1.0.0 -m "Release version 1.0.0"
# Push tags
git push origin --tags
# Delete tag
git tag -d v1.0.0
git push origin --delete v1.0.0Troubleshooting
# Fix "detached HEAD"
git checkout main
# Recover deleted branch
git reflog
git checkout -b recovered-branch abc1234
# Find lost commits
git fsck --lost-found
# Reset to remote state
git fetch origin
git reset --hard origin/mainGit Aliases
Add to ~/.gitconfig:
[alias]
co = checkout
br = branch
ci = commit
st = status
lg = log --oneline --graph --decorate -20
unstage = reset HEAD --
last = log -1 HEAD
amend = commit --amend --no-editTips
- Always pull before starting new work
- Commit early and often
- Write meaningful commit messages
- Use branches for features/fixes
- Never force push to shared branches
- Review changes before committing with
git diff
Resources
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

