agentleFS
OpenxIntelligenceOpenxIntelligence/Coding-Agent-Skills/git-helper/SKILL.md

git-helper

Skill4 starsChanged 26 days agoMITView on GitHub

Version control made simple for vibecoders. Use when user asks about git, commits, branches, pushing, pulling, undoing changes, merge conflicts, or says things like "save my work", "go back to before", "I messed up git", "how do I undo", or needs to collaborate on code.

  • Deletes or force-pushes
  • Commits and pushes

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Look for lines with <<<<<<<, =======, >>>>>>>

    line 116
  2. Distinctive:

    Keep the code you want, delete the markers

    line 117
  3. Distinctive:

    Don't panic. Just:

    line 135
  4. Distinctive:

    If you have changes you want to keep:

    line 139
  5. Distinctive:

    Create empty repo on GitHub (no README)

    line 256

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Git Helper

Git commands translated for vibecoders.

The Only Commands You Really Need

Save Your Work

git add .
git commit -m "describe what you changed"

Upload to GitHub/Remote

git push

Download Latest Changes

git pull

Common Tasks

"I want to save a checkpoint before trying something risky"

git add .
git commit -m "checkpoint before trying X"

"I want to undo what I just did"

Undo last commit but keep the changes:

git reset --soft HEAD~1

Throw away all uncommitted changes:

git checkout .

Undo changes to a specific file:

git checkout -- path/to/file.js

Go back to how it was on GitHub:

git fetch origin
git reset --hard origin/main

"I want to see what changed"

git status              # what files changed
git diff                # what lines changed (unstaged)
git diff --staged       # what lines changed (staged)
git log --oneline -10   # last 10 commits
git show HEAD           # see last commit details

"I want to work on something separate"

git checkout -b my-new-feature    # create branch
# ... do your work ...
git add .
git commit -m "my changes"
git push -u origin my-new-feature # upload branch

"I want to get someone else's branch"

git fetch origin
git checkout their-branch-name

"I want to merge my branch into main"

git checkout main
git pull
git merge my-new-feature
git push

Fixing Mistakes

"I committed to the wrong branch"

git reset --soft HEAD~1           # undo commit, keep changes
git stash                          # save changes temporarily
git checkout correct-branch        # switch branches
git stash pop                      # bring changes back
git add .
git commit -m "your message"

"I need to change my last commit message"

git commit --amend -m "new message"

"I want to add something to my last commit"

git add .
git commit --amend --no-edit

"Git says I have merge conflicts"

  1. Open the file with conflicts
  2. Look for lines with <<<<<<<, =======, >>>>>>>
  3. Keep the code you want, delete the markers
  4. Save the file
  5. git add . then git commit -m "resolved conflicts"

"Git won't let me pull"

# Option 1: Save your changes first
git stash
git pull
git stash pop

# Option 2: Commit first
git add .
git commit -m "my changes"
git pull

"I'm in 'detached HEAD' state"

Don't panic. Just:

git checkout main

If you have changes you want to keep:

git checkout -b save-my-work

"I want to completely start over"

git fetch origin
git reset --hard origin/main

⚠️ This throws away ALL local changes

"I accidentally deleted a file"

git checkout HEAD -- path/to/deleted/file.js

"I need to grab just one commit from another branch"

git cherry-pick <commit-hash>

Working with Stash

Save changes for later (named):

git stash push -m "work in progress on feature X"

See all stashes:

git stash list

Restore a specific stash:

git stash pop stash@{0}   # most recent
git stash pop stash@{1}   # second most recent

Delete a stash:

git stash drop stash@{0}

Daily Workflow

Start of day:

git pull

While working (save often):

git add .
git commit -m "what I did"

End of day:

git push

Branch Cleanup

Delete local branch:

git branch -d branch-name      # safe delete
git branch -D branch-name      # force delete

Delete remote branch:

git push origin --delete branch-name

See all branches:

git branch -a

Quick Reference

I want to...Command
Save workgit add . && git commit -m "msg"
Uploadgit push
Downloadgit pull
Undo last commitgit reset --soft HEAD~1
Throw away changesgit checkout .
New branchgit checkout -b branch-name
Switch branchgit checkout branch-name
See statusgit status
See historygit log --oneline
Save for latergit stash
Get saved work backgit stash pop
See what changedgit diff
Abort mergegit merge --abort

GitHub-Specific

Clone a repo:

git clone https://github.com/user/repo.git

Add a remote:

git remote add origin https://github.com/user/repo.git

See remotes:

git remote -v

Create repo from existing folder:

  1. Create empty repo on GitHub (no README)
  2. Then:
git init
git add .
git commit -m "initial commit"
git remote add origin https://github.com/user/repo.git
git push -u origin main

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.