Git Quick Reference
💻
General Tools+ Agent Template

Git Quick Reference

Quick access to everyday Git commands for branching and team collaboration—version control made simple.

TRIGGERYour InputDescribe whatyou need1Initial SetupConfigure user info and init2🎨Branch WorkflowCreate, switch, merge, and d3Remote SyncPull, push, and resolve conf4History CheckUse diff, log, and blame to OUTPUTTaskComplete
Overview

What Is Git Quick Reference?

Git Quick Reference is a high-performance version control and collaborative development guide skill on EasyClaw designed to simplify everyday Git operations. Instead of getting stuck on complex branching, merging, or conflict-resolution commands, this skill provides developers, technical leads, and operations teams with instant access to standard, clear command pipelines — covering repository cloning, feature branch creation, upstream merging, and safe merge conflict abortion.

The skill is built for junior developers onboarding to new projects, engineers managing multiple feature branches, and operations teams coordinating release deployments.

The expected outcome is rapid, risk-free version control: precise command sequences tailored to your team's branching strategy, clear explanations of what each command does, and step-by-step instructions to safely resolve merge conflicts.

How Git Quick Reference Works

1. Analyze command intent. Describe your version control goal (e.g., "clone a repository and set my name" or "abort a conflict-heavy merge").

2. Retrieve optimal command sequences. The skill retrieves the exact Git commands required for your task, avoiding deprecated flags and recommending modern, safe conventions.

3. Branching strategy alignment. It structures commands according to your team's branching workflow (Git Flow, GitHub Flow, or Trunk-Based Development).

4. Step-by-step conflict resolution. When a merge conflict occurs, the skill provides a sequence to identify conflicting files, examine differences, and safely abort or commit the resolved code.

5. Output generation. Commands are delivered as clean, copy-pasteable terminal blocks accompanied by brief, helpful explanations of what each step does.

Key Features

- Clean clone initialization: Clone repositories and pre-configure user name and email in single-command lines.
- Feature branch manager: Precise commands to create, push, merge, and clean up feature branches safely.
- Merge conflict abort: Quick, non-destructive sequences to abort broken merges and restore working states.
- Git Flow blueprinting: Natively supports Git Flow, GitHub Flow, and other team collaboration models.
- Local status audits: Spot and resolve untracked files and uncommitted changes before branch switching.
- Commit hygiene templates: Provides clear guidelines and templates for writing semantic, clean commit messages.

What Problems Does Git Quick Reference Solve?

1. Onboarding a developer to a new repository
A new developer joins your engineering team. Instead of emailing them a messy text guide, they use the skill: "Just joined—how do I clone the repo and set my name & email?" The skill outputs three precise terminal commands: cloning the repo, setting user name, and setting user email globally, getting them ready to code in 10 seconds.

2. Creating and merging a feature branch safely
An engineer needs to build a login feature on a branch named `dev-login` and merge it into `main` without affecting other developers. The skill provides the exact command sequence: creating the branch, tracking it upstream, pulling latest changes, merging, pushing to main, and deleting the local and remote branches to keep the repo clean.

3. Resolving a broken pull merge conflict
A developer runs `git pull` and is hit with a wall of conflicts. They want to see which files are broken and how to safely abort the merge to prevent losing their local edits. The skill outputs the exact commands: showing conflicting files, running a non-destructive status check, and aborting the merge safely using `git merge --abort`.

4. Cleaning up uncommitted files before switching branches
A developer wants to switch to a main branch to fix a bug, but has 5 uncommitted files they don't want to lose. The skill guides them to use Git stash: providing commands to stash active changes, switch branches, apply the hotfix, return, and pop their stashed changes back into their working directory safely.

5. Rewriting an incorrect commit message before pushing
An engineer commits code but notices a typo in their commit message. Before pushing to GitHub, they use the skill to amend the message. The tool outputs `git commit --amend`, guiding them to rewrite the message without creating duplicate commits.

Example Workflow

A developer needs to create a feature branch, merge it into main, and clean up both local and remote branches.

1. They open EasyClaw and activate Git Quick Reference.
2. They run: *"Give me the commands to create branch 'dev-login', merge to main, and delete the branch."*
3. The skill retrieves the standard branch lifecycle commands and compiles the guide.
4. It outputs the structured Git Command Pipeline:
- Step 1 (Branch): `git checkout -b dev-login` (create and switch).
- Step 2 (Merge): Switch back to main, pull, and run `git merge dev-login`.
- Step 3 (Push & Clean): Push to remote and run `git branch -d dev-login` and `git push origin --delete dev-login`.
5. The developer copies the commands directly into their terminal.

Branch lifecycle managed cleanly in under 30 seconds.

Getting Started with Git Quick Reference

Initial Setup — Configure user info and initialize a repo in one step
Branch Workflow — Create, switch, merge, and delete branches end-to-end
Remote Sync — Pull, push, and resolve conflicts in one go
History Check — Use diff, log, and blame to spot changes fast

Core Features

Initial Setup

Configure user info and initialize a repo in one step

Branch Workflow

Create, switch, merge, and delete branches end-to-end

Remote Sync

Pull, push, and resolve conflicts in one go

History Check

Use diff, log, and blame to spot changes fast

Frequently Asked Questions

What is the difference between git merge and git rebase?

`git merge` combines branches by creating a new merge commit, preserving the exact chronological history. `git rebase` reapplies your commits on top of the target branch's latest commit, producing a clean, linear commit history. Rebase should be used for personal branches; merge for public shared branches.

How do I undo my last commit?

If you haven't pushed yet, use `git reset --soft HEAD~1` to undo the commit while keeping your edited files in your working directory. If you want to completely erase the commit and all changes, use `git reset --hard HEAD~1` (use with caution).

What does "git pull shows conflicts" mean?

This occurs when a file was modified in the same lines on both your local machine and the remote repository. Git cannot automatically decide which version is correct and pauses the pull, requiring you to open the file and manually select the correct code lines.

What is the difference between git fetch and git pull?

`git fetch` downloads the latest branch data and commits from the remote repository to your local machine but does not merge them into your active code. `git pull` is a combination of `git fetch` followed immediately by `git merge`, updating your working files.

How do I completely discard my local changes?

To discard all uncommitted changes in your current working directory and restore your files to the last committed state, run `git checkout .` or `git restore .`. Note that this action is destructive and cannot be undone.

What is a ".gitignore" file?

A `.gitignore` file is a text configuration placed in your repository root that tells Git which files and folders to completely ignore (such as `node_modules/`, local `.env` files, or build caches), preventing private keys and bloated folders from being committed.

Can I rename a branch?

Yes. To rename your active local branch, run `git branch -m new-branch-name`. To rename a different branch, run `git branch -m old-name new-name`.

How do I check my git commit history?

Use `git log` to view your detailed commit history. For a cleaner, more scannable visual history, use `git log --oneline --graph --decorate --all` to display a graphical branch tree in your terminal.

What is a "detached HEAD" state?

This occurs when you checkout a specific historical commit instead of an active branch. In this state, any new commits you make are not saved to a branch. To exit, run `git checkout main` or switch back to an active branch.

Is my code uploaded to EasyClaw?

No. This skill is a command lookup utility. All command evaluations, terminal scripts, and repository operations are executed locally on your machine, ensuring your proprietary code and repository configurations remain private.

Add Git Quick Reference to Your Workflow

Get EasyClaw, add this skill, and start building AI agent workflows in minutes.

Get EasyClaw Free →