ワンクリックで
git-essentials
Essential Git commands and workflows for version control, branching, and collaboration.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Essential Git commands and workflows for version control, branching, and collaboration.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use this model doc whenever the user wants to run BrainGNN for fMRI phenotype prediction, including graph construction, training, and evaluation. This document focuses on model-level usage and delegates upstream preprocessing to fmri-skill (and optionally hcpya-skill for HCP data).
Use this skill when users need to build, populate, or extend a domain-specific knowledge graph from literature and structured databases. Triggers include: 'build knowledge graph', 'extract claims from papers', 'ingest data into graph', 'batch extract claims', 'knowledge graph construction', 'populate graph from PubMed', 'extract structured claims', 'ingest atlas data', or any request involving knowledge graph population from scientific literature or biomedical databases. Covers both structured data ingestion (Phase 1) and LLM-based claim extraction from papers (Phase 2).
Use this skill whenever the user wants to formalize a network architecture and derive theoretical components from a research idea. Triggers include: 'method design', 'design method', 'network architecture', 'formula derivation', 'method-design', 'theoretical framework', 'derive equations', 'compare alternatives', 'architecture tournament', 'rank designs', 'design space exploration', or any request to transform IDEA.md into a detailed METHOD.md. This skill is the **mandatory interface-layer method formalizer** in NeuroClaw: it reads IDEA.md, optionally drafts N alternative architectures and ranks them via a Bradley-Terry pairwise tournament (Tournament Mode), designs concrete network structures (layers, modules, connections), performs mathematical derivations (equations, loss functions, proofs), and always outputs a structured METHOD.md.
Use this skill whenever the user wants to remove site/scanner/batch effects from neuroimaging features before running downstream models, run mega-analysis across multiple datasets, or evaluate models with leave-site-out / site-stratified protocols. Triggers include: 'harmonize', 'ComBat', 'CovBat', 'site effect', 'scanner effect', 'batch effect', 'leave-site-out', 'mega-analysis', 'multi-site', 'cross-site', 'neuroHarmonize'. This is a horizontal cross-cutting layer between dataset skills and model skills.
Use this skill whenever the user wants to run phenotype-prediction models, browse model cards, map model inputs/outputs, or choose an execution route for fMRI/sMRI based models. This is a model-entry orchestration skill: it routes requests to model-specific docs and delegates preprocessing to modality skills.
Use this model doc whenever the user wants to run Com-BrainTF (Community-aware Brain Transformer) for fMRI phenotype prediction. Com-BrainTF uses dense FC matrices with a two-level Transformer (per-community local + global) and DEC pooling. NeuroClaw auto-derives community partitions from atlas naming conventions (Yeo 7-net for Schaefer, lobe-based for AAL).
| name | git-essentials |
| description | Essential Git commands and workflows for version control, branching, and collaboration. |
| layer | base |
| skill_type | tool |
| dependencies | [] |
git-essentials is the NeuroClaw base skill for all version control operations. It provides the essential Git commands for initializing repositories, staging, committing, branching, merging, working with remotes, viewing history, undoing changes, stashing, rebasing, tagging, and common daily workflows.
This skill serves as the foundation for any project that requires reproducible code management, experiment tracking, or collaboration inside NeuroClaw.
Research use only — always combine with git-workflows for advanced operations.
# Configure user
git config --global user.name "Your Name"
git config --global user.email "your@email.com"
# Initialize repository
git init
# Clone repository
git clone https://github.com/user/repo.git
git clone https://github.com/user/repo.git custom-name
# Check status
git status
# Add files to staging
git add file.txt
git add .
git add -A # All changes including deletions
# Commit changes
git commit -m "Commit message"
# Add and commit in one step
git commit -am "Message"
# Amend last commit
git commit --amend -m "New message"
git commit --amend --no-edit # Keep message
# Show unstaged changes
git diff
# Show staged changes
git diff --staged
# Show changes in specific file
git diff file.txt
# Show changes between commits
git diff commit1 commit2
# List branches
git branch
git branch -a # Include remote branches
# Create branch
git branch feature-name
# Switch branch
git checkout feature-name
git switch feature-name # Modern alternative
# Create and switch
git checkout -b feature-name
git switch -c feature-name
# Delete branch
git branch -d branch-name
git branch -D branch-name # Force delete
# Rename branch
git branch -m old-name new-name
# Merge branch into current
git merge feature-name
# Merge with no fast-forward
git merge --no-ff feature-name
# Abort merge
git merge --abort
# Show merge conflicts
git diff --name-only --diff-filter=U
# List remotes
git remote -v
# Add remote
git remote add origin https://github.com/user/repo.git
# Change remote URL
git remote set-url origin https://github.com/user/new-repo.git
# Remove remote
git remote remove origin
# Fetch from remote
git fetch origin
# Pull changes (fetch + merge)
git pull
# Pull with rebase
git pull --rebase
# Push changes
git push
# Push new branch
git push -u origin branch-name
# Force push (careful!)
git push --force-with-lease
# Show commit history
git log
# One line per commit
git log --oneline
# With graph
git log --graph --oneline --all
# Last N commits
git log -5
# Commits by author
git log --author="Name"
# Commits in date range
git log --since="2 weeks ago"
git log --until="2024-01-01"
# File history
git log -- file.txt
# Search commit messages
git log --grep="bug fix"
# Search code changes
git log -S "function_name"
# Show who changed each line
git blame file.txt
# Find commit that introduced bug
git bisect start
git bisect bad
git bisect good commit-hash
# Discard changes in file
git restore file.txt
git checkout -- file.txt # Old way
# Discard all changes
git restore .
# Unstage file
git restore --staged file.txt
git reset HEAD file.txt # Old way
# Unstage all
git reset
# Undo last commit (keep changes)
git reset --soft HEAD~1
# Undo last commit (discard changes)
git reset --hard HEAD~1
# Revert commit (create new commit)
git revert commit-hash
# Reset to specific commit
git reset --hard commit-hash
# Stash changes
git stash
# Stash with message
git stash save "Work in progress"
# List stashes
git stash list
# Apply latest stash
git stash apply
# Apply and remove stash
git stash pop
# Apply specific stash
git stash apply stash@{2}
# Delete stash
git stash drop stash@{0}
# Clear all stashes
git stash clear
# Rebase current branch
git rebase main
# Interactive rebase (last 3 commits)
git rebase -i HEAD~3
# Continue after resolving conflicts
git rebase --continue
# Skip current commit
git rebase --skip
# Abort rebase
git rebase --abort
# List tags
git tag
# Create lightweight tag
git tag v1.0.0
# Create annotated tag
git tag -a v1.0.0 -m "Version 1.0.0"
# Tag specific commit
git tag v1.0.0 commit-hash
# Push tag
git push origin v1.0.0
# Push all tags
git push --tags
# Delete tag
git tag -d v1.0.0
git push origin --delete v1.0.0
# Apply specific commit
git cherry-pick commit-hash
# Cherry-pick without committing
git cherry-pick -n commit-hash
# Add submodule
git submodule add https://github.com/user/repo.git path/
# Initialize submodules
git submodule init
# Update submodules
git submodule update
# Clone with submodules
git clone --recursive https://github.com/user/repo.git
# Preview files to be deleted
git clean -n
# Delete untracked files
git clean -f
# Delete untracked files and directories
git clean -fd
# Include ignored files
git clean -fdx
Feature branch workflow:
git checkout -b feature/new-feature
# Make changes
git add .
git commit -m "Add new feature"
git push -u origin feature/new-feature
# Create PR, then after merge:
git checkout main
git pull
git branch -d feature/new-feature
Hotfix workflow:
git checkout main
git pull
git checkout -b hotfix/critical-bug
# Fix bug
git commit -am "Fix critical bug"
git push -u origin hotfix/critical-bug
# After merge:
git checkout main && git pull
Syncing fork:
git remote add upstream https://github.com/original/repo.git
git fetch upstream
git checkout main
git merge upstream/main
git push origin main
Add to ~/.gitconfig:
[alias]
st = status
co = checkout
br = branch
ci = commit
unstage = reset HEAD --
last = log -1 HEAD
visual = log --graph --oneline --all
amend = commit --amend --no-edit
.gitignore for files to exclude--force-with-lease instead of --forceUndo accidental commit:
git reset --soft HEAD~1
Recover deleted branch:
git reflog
git checkout -b branch-name <commit-hash>
Fix wrong commit message:
git commit --amend -m "Correct message"
Resolve merge conflicts:
# Edit files to resolve conflicts
git add resolved-files
git commit # Or git merge --continue
git-workflows for advanced operationsdependency-planner installs new tools that require Gitgit-workflows → advanced operations (rebase, bisect, worktree, sparse checkout, etc.)claw-shell → all Git commands are safely executed through claw-shellOfficial docs: https://git-scm.com/doc
Pro Git book: https://git-scm.com/book
Visual Git guide: https://marklodato.github.io/visual-git-guide/
Created At: 2026-03-19 00:00 HKT
Last Updated At: 2026-03-25 23:57 HKT
Author: chengwang96