git-remote

Manage git remotes and synchronize local branches with remote refs.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/theslashdojo/dojo --skill git-remote
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-remote
Source: https://github.com/theslashdojo/dojo/tree/main/nodes/git/remote
Command: npx skills add https://github.com/theslashdojo/dojo --skill git-remote

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires git, and includes scripts (resource) components.

What problem does it solve?

Keep local repositories synchronized with remote hosts and avoid merge conflicts, accidental overwrites, and broken fork workflows by providing clear, repeatable commands and checks for remote operations.

Core Features & Use Cases

  • Manage and configure remotes (origin, upstream) for forks and collaborative repositories.
  • Clone repositories efficiently, fetch remote state, pull with merge or rebase, and push updates with safe force semantics.
  • Automated sync script that detects ahead/behind/diverged states and recommends or performs fetch, rebase, or push operations.
  • Use case: syncing a feature branch with upstream changes, rebasing, and pushing to origin while preventing accidental history overwrite.

Quick Start

Use the git-remote skill to fetch the remote, rebase your current branch onto the tracking branch if needed, and push to the configured remote using safe push semantics.

Frequently Asked Questions about git-remote

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync a local git branch with remote refs without causing merge conflicts?

To sync local git branches with remote refs safely, fetch the remote state first, then pull with rebase to integrate upstream changes. This avoids merge conflicts by applying local commits on top of the fetched branch history.

What is the best way to configure origin and upstream remotes for a forked repository?

Configuring origin and upstream remotes for forks involves adding the upstream repository URL via git commands. This setup allows you to fetch upstream changes independently and push local updates to your origin fork.

How does force-with-lease prevent accidental history overwrites when pushing branches?

Force-with-lease prevents accidental history overwrites during a git push by checking that your local remote refs match the actual remote state. It only allows the push if no one else has updated the remote branch.

How do I fetch remote state before pushing to ensure safe collaborative git workflows?

Fetching remote state before pushing ensures safe collaborative git workflows by retrieving the latest remote refs without modifying your working directory. You can then rebase local commits and push without overwriting unexpected changes.

Can I automate git fetch, rebase, and push operations using a script?

Yes, you can automate git fetch, rebase, and push operations using a scripted sync process. The automation detects whether branches are ahead, behind, or diverged, then recommends or performs the appropriate synchronization commands.

Do I need git installed to manage remote repositories and synchronize local branches?

Yes, you need git installed as a dependency to manage remote repositories and synchronize local branches. The skill relies on git commands to configure remotes, fetch state, pull with rebase, and push updates.