agentleFS
89jobrien89jobrien/godmode/skills/remote-upstream-triage/SKILL.md

remote-upstream-triage

Skill1 starsChanged 57 days agoMITView on GitHub

Use when git push, PR creation, or merge flow fails because the current branch has no upstream, the wrong remote is selected, or remote branches have drifted across forges. Symptoms - `git push` says no configured destination, PR tools target the wrong remote, or branch tracking does not match where the work was pushed.

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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. Distinctive:

    Use this when branch tracking or remote selection is the actual problem, not git auth or merge conflicts.

    line 10
  2. Very specific:

    Do not assume origin is the correct push target.

    line 34

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Remote Upstream Triage

When to Use

Use this when branch tracking or remote selection is the actual problem, not git auth or merge conflicts. The goal is to identify the active remote, set the correct upstream, and avoid pushing or opening a PR against the wrong forge.

Commands

# Inspect remotes and branch tracking
 git remote -v
 git branch -vv
 git status --short --branch

# Check where the current branch exists remotely
 git ls-remote <remote> "refs/heads/$(git branch --show-current)"

# Set upstream while pushing the current branch
 git push -u <remote> $(git branch --show-current)

# Verify base branch divergence across remotes
 git rev-parse main
 git rev-parse <remote>/main

Rules

  • Identify the remote that already carries the branch before opening a PR.
  • Do not assume origin is the correct push target.
  • Compare base branch SHAs across remotes before using GitHub tooling in dual-forge repos.
  • Set upstream once the right remote is confirmed so future plain git push works.

Common Failures

SymptomFix
git push says no configured push destinationPush with -u <remote> <branch> to set upstream
PR tool targets GitHub but the branch only exists on GiteaPush or create the PR on the tracked remote instead
main differs across remotesTreat the forges as divergent and choose the base intentionally

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.