npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

git-duo

v0.0.3-b

Published

Git DUO is a tool designed to automate the process of mirroring Git repositories across multiple platforms. Born out of a traumatic experience where my GitHub account was temporarily limited during a server disruption, Git DUO ensures that your hard work

Downloads

12

Readme

Git DUO - Never Lose Access to Your Repositories Again

Supported Platforms

Linux Windows Node JS






Table of Contents 📝

Features and Benefits ✨

  • Automatic Mirroring: Git DUO automatically pushes commits to both GitHub and GitLab, ensuring your work is always available on multiple platforms.
  • Post-Commit Hook Integration: Includes a Git template with a post-commit hook that seamlessly pushes updates to both platforms with a single command.
  • Dual Repository Creation: Create repositories with the same name on GitHub and GitLab simultaneously with a single command.
  • Effortless Setup: Git DUO automates the addition of a secondary remote link to your repositories, minimizing manual effort.
  • Continuous Access: By maintaining repositories on both platforms, you safeguard against service disruptions, ensuring uninterrupted access to your projects.
  • Seamless Integration: Works directly within your existing Git workflow, making it easy to integrate into your development process.

Use Cases ✅

  • Redundancy for Mission-Critical Projects: Ensure that your important projects are always available by mirroring them on both GitHub and GitLab.
  • Automated Backup: Reduce the risk of losing access to your repositories by automatically maintaining copies on two platforms.
  • Efficient Repository Management: Manage multiple repositories across platforms without the need for manual syncing, saving time and reducing errors.
  • Peace of Mind: Protect your work from unforeseen disruptions, ensuring that your years of effort are not lost due to temporary service outages.
  • Streamlined Development: Developers who work on multiple platforms can use Git DUO to keep their repositories in sync effortlessly.
  • Portfolio Resilience: Ensure that your public portfolio, hosted on GitHub Pages or similar services, remains accessible even during platform-specific issues.

🙏🏻 Friendly Request to Users

Every star on this repository is a sign of encouragement, a vote of confidence, and a reminder that our work is making a difference. If this project has brought value to you, even in the smallest way, please consider showing your support by giving it a star.

"Star" button located at the top-right of the page, near the repository name.

Your star isn’t just a digital icon—it’s a beacon that tells us we're on the right path, that our efforts are appreciated, and that this work matters. It fuels our passion and drives us to keep improving, building, and sharing.

If you believe in what we’re doing, please share this project with others who might find it helpful. Together, we can create something truly meaningful.

Thank you for being part of this journey. Your support means the world to us. 🌍💖


Installation - Step-by-Step Guide 🪜

Prerequisites

Before you begin, ensure you have the following:

  1. Node.js: Git DUO is a Node.js application. Ensure you have Node.js installed on your machine. You can download it from Node.js official website.

  2. GitHub Personal Access Token:

    • Generate a personal access token (PAT) from GitHub. This token is required to authenticate with the GitHub API.
    • Scope of PAT - Requires repo scope.
    • Store this token in an environment variable named github_token.
    • How to create a GitHub PAT.
  3. GitLab Personal Access Token:

    • Generate a personal access token from GitLab. This token is required to authenticate with the GitLab API.
    • Scope of PAT - Requires api scope with read & write permission.
    • Store this token in an environment variable named gitlab_token.
    • How to create a GitLab PAT.

    Note: The environment variables need to be set manually in your operating system, as the application does not support .env files.

  4. Install via npm:

    • To install Git DUO globally using npm, run the following command:
      npm install -g git-duo
    • This will make the Git DUO CLI commands available system-wide.
  5. Set Up the Git Template:

    • To set up the Git template for automatic mirroring, use the following command:

      gdt [destination-path]
    • If no destination path is provided, the template will be added to the default user directory.

    • How It Works: Once the template is set up, every time you commit changes to a repository, the changes are automatically pushed to the secondary remote (GitLab) by a post-commit hook. The primary repository (GitHub) is pushed by the user.

Usage

  • Create a New Repository on Both Platforms:

    • Use the following command to create a new repository on both GitHub and GitLab:
      gd <repository-name> --private
    • The --private flag is optional and will make the repository private if included.
  • Recommended Workflow:

    • If using VS Code: Simply commit and push as you normally would in the VS Code interface. The changes will be pushed to GitHub by your action and to GitLab by the post-commit hook.
    • If using the CLI: You can commit and push using the following command:
      git commit -m "message" && git push
    • By doing so, both the primary (GitHub) and secondary (GitLab) repositories will be updated—GitHub by your push command and GitLab by the commit hook.

License ©️

This project is licensed under the MIT.

Contributing to Our Project 🤝

We’re always open to contributions and fixing issues—your help makes this project better for everyone.

If you encounter any errors or issues, please don’t hesitate to raise an issue. This ensures we can address problems quickly and improve the project.

For those who want to contribute, we kindly ask you to review our Contribution Guidelines before getting started. This helps ensure that all contributions align with the project's direction and comply with our existing license.

We deeply appreciate everyone who contributes or raises issues—your efforts are crucial to building a stronger community. Together, we can create something truly impactful.

Thank you for being part of this journey!

Website 🌐

npmjs - git-duo

Contact Information

For any questions, please reach out via [email protected] or LinkedIn.

Credits

Git DUO was developed by DARSAN, inspired by a personal experience of service disruption and limited access to a GitHub account. The project was created to provide a solution for developers who need reliable access to their repositories across multiple platforms.



Topics