Git Product home page Git Product logo

git-synced's Introduction

git-synced Build Status

๐ŸŽ Keep a fork up to date

Install

$ npm install -g git-synced

Usage

$ git-synced --help

  Usage:
    $ git-synced                Update fork
    $ git-synced <repo url>     Update fork with GitHub repo url
    $ git-synced <user/repo>    Update fork with GitHub repo

  Example:
    $ git-synced
    $ git-synced https://github.com/bukinoshita/git-synced
    $ git-synced bukinoshita/git-synced
    $ git-synced --branch=staging
    $ git-synced --default

  Options:
    -b BRANCH, --branch=BRANCH  Choose branch as default
    -d, --default               Use master branch as default
    -h, --help                  Show help options
    -v, --version               Show version

Demo

Related

License

MIT ยฉ Bu Kinoshita

git-synced's People

Contributors

bukinoshita avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

git-synced's Issues

choose branch to update

when user update their fork, it update from master, show list of branches so user can select.

add branch flag

If we can't get the repository branches it returns only master as default. If user want to sync their fork with a private project, we can't get their branches bc it's private.

So to solve that it should have a fallback where users can still sync with other branches having a branch flag as an option.

$ git-synced --branch=staging

// or

$ git-synced -b staging

By running that command should skip the getting branches process, also make sure userRepo assignment is done when checking upstream.

return getBranches(repo)
  .then(branches => {
    spinner.stop()
    userRepo = repo // `userRepo` should be assigned on `checkUpstream` process.
    return branches
  })
  .catch(err => {
    spinner.stop()
    shoutError(err)
    process.exit()
  })

add default flag

Add default flag to skip getting branches process.

$ git-synced --default

// or

$ git-synced -d

Default branch should be master

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.