git-operations
Skill4 starsChanged 6 months agoMITView on GitHub
Common git operation patterns and commands. Use when working with git branches, commits, staging, rebasing, stashing, or any other git operations. Triggers include branching, committing, merging, rebasing, and syncing with remote repositories.
- Deletes or force-pushes
- Commits and pushes
5 other projects use a version of this.
Adopted by
Most recently taken up by
- komluk/scaffoldingtheir own version, first seen Nov 7, 2026
- GoogleCloudPlatform/sciontheir own version, first seen Oct 13, 2026
- m16khb-org/issueopstheir own version, first seen Sep 24, 2026
- snui1s/losna-clitheir own version, first seen Aug 31, 2026
- poorvith-mp/skills-developertheir own version, first seen Aug 19, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- GoogleCloudPlatform/scion★ 2.1ksame name
- komluk/scaffolding★ 16same name
- m16khb-org/issueops★ 6same name
- snui1s/losna-cli★ 1same name
- poorvith-mp/skills-developer★ 0same 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 repository37 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adaptSkill
- animateSkill
- arrangeSkill
- auditSkill
- bolderSkill
- clarifySkill
- code-refactorSkill
- colorizeSkill
- critiqueSkill
- delightSkill
- distillSkill
- extractSkill
- frontend-designSkill
- gitlab-integrationSkill
- hardenSkill
- industrial-ai-researchSkill
- latex-paper-enSkill
- latex-thesis-zhSkill
- mermaid-diagramsSkill
- normalizeSkill
- onboardSkill
- optimizeSkill
- overdriveSkill
- paper-auditSkill
- polishSkill
- pydanticSkill
- python-best-practicesSkill
- python-docsSkill
- pytorch-lightningSkill
- quieterSkill
- remotion-best-practicesSkill
- research-paper-writingSkill
- skill-creatorSkill
- teach-impeccableSkill
- typesetSkill
- typst-paperSkill
The file
Files
Git Operations
Reusable patterns for common git operations in this repository.
Branch Operations
Create Feature Branch
git checkout main
git pull origin main
git checkout -b feature/<name>Create Task Branch (Cascade)
git checkout <parent-branch>
git checkout -b task-N-<description>Delete Branch
git branch -d <branch-name> # Safe delete
git branch -D <branch-name> # Force delete
git push origin --delete <branch-name> # Delete remoteList Branches
git branch # Local branches
git branch -r # Remote branches
git branch -a # All branchesCommit Operations
Standard Commit
git add <files>
git commit -m "<type>(<scope>): <description>"Commit Types
feat- New featurefix- Bug fixdocs- Documentationstyle- Formattingrefactor- Code restructuringtest- Testschore- Maintenance
Amend Last Commit
git commit --amend -m "new message" # Change message only
git add <files> && git commit --amend --no-edit # Add files to last commitView Commit History
git log --oneline -10 # Recent commits
git log --oneline --graph -20 # With graph
git log --oneline -- <file> # For specific fileStaging Operations
Stage Files
git add file1.py file2.py # Specific files
git add "*.py" # By pattern
git add . # All changesUnstage Files
git restore --staged <file>View Changes
git diff # Unstaged changes
git diff --staged # Staged changesSync Operations
Fetch Updates
git fetch originPull Changes
git pull origin <branch>Push Changes
git push origin <branch> # Normal push
git push -u origin <branch> # Set upstream
git push --force-with-lease origin <branch> # Force push (use carefully!)Rebase Operations
Rebase on Branch
git checkout <feature-branch>
git rebase <base-branch>Interactive Rebase
git rebase -i HEAD~<n>Continue After Conflict
# After resolving conflicts
git add <resolved-files>
git rebase --continueAbort Rebase
git rebase --abortStash Operations
Stash Changes
git stash
git stash push -m "description"List Stashes
git stash listApply Stash
git stash pop # Apply and remove
git stash apply # Apply and keepDrop Stash
git stash drop stash@{0}Diff Operations
Compare Branches
git diff main..feature-branchCompare Commits
git diff <commit1>..<commit2>Show Changed Files
git diff --name-only main..HEADReset Operations
Soft Reset (keep changes staged)
git reset --soft HEAD~1Mixed Reset (keep changes unstaged)
git reset HEAD~1Hard Reset (discard changes)
git reset --hard HEAD~1Cherry Pick
Pick Single Commit
git cherry-pick <commit-sha>Pick Without Commit
git cherry-pick --no-commit <commit-sha>Tags
Create Tag
git tag v1.0.0
git tag -a v1.0.0 -m "Release 1.0.0"Push Tags
git push origin v1.0.0
git push origin --tagsSafety Guidelines
- Never force push to main
- Use
--force-with-leaseinstead of--force - Always pull before pushing
- Review diff before committing
- Don't commit sensitive data
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.

