मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग70k · #3134

git-master

यह क्या करती है

यह agent Git की मदद से आपके code के version history को संभालता है। यह आपके बदलावों को साफ़ विवरण के साथ save (commits) कर सकता है, change history को व्यवस्थित कर सकता है, और इस सवाल का जवाब दे सकता है कि किसने कब क्या बदला।

कब इस्तेमाल करें

  • ✓जब आपको code में हुए बदलावों के एक समूह को save करना हो।
  • ✓जब आप समझना चाहते हैं या दोबारा व्यवस्थित करना चाहते हैं कि code में बदलाव किस क्रम में हुए।
  • ✓जब आपको यह पता लगाना हो कि code में कोई खास बदलाव किसने किया।

Skill का लिंक

https://github.com/code-yeongyu/oh-my-openagent/blob/dev/packages/shared-skills/skills/git-master/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/code-yeongyu/oh-my-openagent/blob/dev/packages/shared-skills/skills/git-master/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे हाल के बदलावों को 'Add login functionality' संदेश के साथ commit में save करो।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह आपके commands का विश्लेषण करता है और commits बनाने, history को व्यवस्थित करने, या पुराने बदलावों की जानकारी लेने जैसे काम करने के लिए Git tools का इस्तेमाल करता है। कोई भी कदम उठाने से पहले यह code की मौजूदा स्थिति जांचता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Git Master

Use this skill when the user asks you to operate on Git history or answer a Git-history question. Be exact, conservative, and evidence-led. Read the repository state before you infer anything.

Mode Gate

Classify the request first:

  • COMMIT: stage and commit local changes.
  • REBASE: rebase, squash, fixup, autosquash, reorder, split, or otherwise rewrite branch history.
  • HISTORY: answer when, where, who, why, or which commit changed something.
  • STATUS: inspect branch, diff, or working-tree state without changing it.

Do not commit, rebase, push, force-push, reset, stash-pop, or delete anything unless the user explicitly asked for that operation. If the request is only investigative, report findings and stop.

Ground Truth

Gather independent facts in parallel when the tools allow it:

git status --short
git diff --stat
git diff --staged --stat
git branch --show-current
git log -30 --oneline
git log -30 --pretty=format:%s
git rev-parse --abbrev-ref @{upstream}
git merge-base HEAD origin/main
git merge-base HEAD origin/master

Missing upstream or missing main/master is normal. Fall back to the best available branch or report the missing fact. Never treat a failed lookup as proof.

PR Body Evidence Attachments

When a PR body needs screenshots or terminal PNGs, use the repo reference at docs/reference/github-attachment-upload.md. The allowed hosting path is GitHub user attachments from the authenticated web attachment flow; never commit temporary images, never use GitHub Releases for PR evidence, and never use external image hosts. Do not log browser cookies, CSRF tokens, S3 form fields, or upload headers.

Commit Mode

Commit only the user's requested changes. Preserve unrelated dirty work.

  1. Detect message style from recent history. Use the dominant local pattern, language, and casing. Do not default to Conventional Commits unless the repo uses them.
  2. Inspect the full diff, not only filenames. Separate unrelated user edits from the requested commit.
  3. Build atomic groups by behavior, module, and revertability. Keep implementation and its direct tests together.
  4. Prefer multiple commits for unrelated concerns. A single commit is acceptable only when the changed files form one indivisible behavior or the user explicitly asks for one commit.
  5. Stage by path or hunk so each commit contains only its atomic group.
  6. Before each commit, verify git diff --staged --stat and enough staged diff to prove the group is right.
  7. Commit with the detected style. After each commit, verify git log -1 --oneline.

Grouping rules:

  • Split different features, modules, generated artifacts, config, docs, and test-only changes unless they are inseparable.
  • Keep generated files with the source change that produced them when omitting them would leave the repo inconsistent.
  • Never hide failing or unrelated changes inside a broad commit.

Final report: list commit hashes, messages, and any remaining uncommitted files.

Rebase Mode

History rewriting is a shared-impact operation.

  • Never rebase or rewrite main, master, dev, release branches, or a protected branch unless the user explicitly named that exact operation.
  • If commits may already be pushed, ask before force-pushing. Use --force-with-lease, never plain --force.
  • If the worktree is dirty, preserve it intentionally before rebasing. Do not stash-pop over conflicts without checking what changed.
  • For fixups, prefer git commit --fixup=<hash> followed by GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash <base>.
  • For conflicts, read the conflicting files and resolve by intent. Do not choose ours/theirs blindly.
  • If a rebase goes wrong, use git rebase --abort first. Use reflog only after explaining the recovery path.

After rewriting, run the relevant tests or at least the project's cheapest smoke check, then show the new branch log from base to HEAD.

History Mode

Choose the Git tool by the question:

  • git log -S "text": when the count of an exact string changed.
  • git log -G "regex": when diffs touched lines matching a pattern.
  • git blame -L start,end -- file: who last changed specific lines.
  • git log --follow -- file: history across renames for one file.
  • git show <hash>: inspect the commit that appears relevant.
  • git bisect: find the first bad commit when there is a deterministic pass/fail command and known good/bad bounds.

…

अक्सर पूछे जाने वाले सवाल

'atomic commit' क्या होता है?

यह ऐसा save होता है जो एक ही काम या fix पर केंद्रित होता है, जिससे history को समझना और संभालना आसान होता है।

'rewriting history' का क्या मतलब है?

इसका मतलब है पहले से किए गए commits को बदलना, जैसे कई commits को एक में जोड़ना या उनका क्रम बदलना। यह काम सावधानी से करना चाहिए।

अगर मैं save करने को न कहूँ तो Git क्या करेगा?

अगर आप केवल history के बारे में सवाल पूछते हैं या status जांचने को कहते हैं, तो यह सिर्फ जानकारी देगा और कोई बदलाव नहीं करेगा।

जानकारी

लेखक का मूल विवरण

Handles git work: atomic commits, rebase, squash, blame, bisect, reflog, and history questions. Use whenever a task needs a commit or a git-history investigation; skip for ordinary code edits.

repo: code-yeongyu/oh-my-openagent

लोकप्रियता

GitHub स्टार
70k
रैंकिंग में स्थान
#3134
लाइसेंस
NOASSERTION
अपडेट की गई
15/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

comment-checker

70k

यह आपके एजेंट को automatic comment checkers के feedback को समझने और उस पर जवाब देने में मदद करता है। automated code या content reviews के नतीजों को प्रोसेस करने में उपयोगी है।

लेखन और डॉक्यूमेंटडॉक्यूमेंटेशन

lcx-contribute-bug-fix

70k

यह आपके एजेंट को LazyCodex से जुड़े projects में bug fixes देने में मदद करता है। code की गुणवत्ता बनाए रखने के लिए यह issues या pull requests बनाता है।

कोडिंगसामान्य कोडिंग

lcx-doctor

70k

यह आपके एजेंट को LazyCodex और Codex CLI installations की स्थिति जांचने देता है। updates या बदलावों के बाद system अजीब व्यवहार करे, तब यह उपयोगी है।

कोडिंगसामान्य कोडिंग

lcx-report-bug

70k

यह आपके एजेंट को LazyCodex projects के bugs विस्तार से रिपोर्ट करने में मदद करता है। यह ऐसे issues बनाता है जिनमें developers के लिए समस्या ठीक करने की काम की जानकारी होती है।

कोडिंगसामान्य कोडिंग

मिलती-जुलती skills