Need help with github-sync?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

repo-sync
222 Stars 47 Forks MIT License 51 Commits 2 Opened issues

Description

⤵️ A GitHub Action for syncing current repository with remote

Services available

!
?

Need anything else?

Contributors list

# 16,170
JavaScr...
probot-...
reposit...
React
29 commits
# 860
Electro...
Heroku
C++
v8
2 commits
# 450,205
Shell
HTML
Java
homeaut...
1 commit
# 4,443
C#
Linux
vmware
netcore
1 commit
# 631,630
Shell
github-...
1 commit

GitHub Sync

All Contributors <!-- ALL-CONTRIBUTORS-BADGE:END -->

A GitHub Action for syncing the current repository using force push.

Features

  • Sync branches between two GitHub repositories
  • Sync branches from a remote repository
  • GitHub action can be triggered on a timer or on push
  • To push to a remote repository, please checkout git-sync
  • Support syncing tags.

Usage

Create a personal access token and add to repository's secret as

PAT

GitHub Actions

# File: .github/workflows/repo-sync.yml

on: schedule:

  • cron: "*/15 * * * *" workflow_dispatch:

jobs: repo-sync: runs-on: ubuntu-latest steps: - uses: actions/[email protected] with: persist-credentials: false - name: repo-sync uses: repo-sync/[email protected] with: source_repo: "" source_branch: "" destination_branch: "" github_token: ${{ secrets.PAT }}

If

source_repo
is private or with another provider, either (1) use an authenticated HTTPS repo clone url like
https://${access_token}@github.com/owner/repository.git
or (2) set a
SSH_PRIVATE_KEY
secret environment variable and use the SSH clone url

Advanced Usage: Sync all branches

  1. Make a backup
  2. Create a new branch in your repo (destination repo), it should not share the name with any branch in source repo
  3. Make the new branch the default branch under repo settings
  4. Use
    *
    for both
    source_branch
    and
    destination_branch
  5. Optionally, you can force sync all tags:
    with:
     sync_tags: "true"
    
    This will force sync ALL branches to match source repo. Branches that are created only in the destination repo will not be affected but all the other branches will be hard reset to match source repo. ⚠️ This does mean if upstream ever creates a branch that shares the name, your changes will be gone.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Wei He

💻 📖 🎨 🤔

Zeke Sikelianos

📖 🤔

Alex Page

🐛

xtqqczze

💻 📖

Kay Harrison-Sims

🐛

Gibby

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.