Code Monkey home page Code Monkey logo

resync-fork's Introduction

Resync repository

This project seeks to be an easy way to update an outdated forked project.

Requirements:

  • You will need to edit the code to change some hardcoded variables. For example:

    • TODO: Set variables to GitHub username
    • TODO: Change working directory
  • Running the scripts takes two arguments:

    • The remote user account
    • The repository
    • USAGE: python refresh.py [remote_user] [repository]
Note to Self/Contributor:

The following may be ignored if you are not a contributor:

  • TODO: I might change the arguments to user inputs that are requested when the script is run (hmm...).
  • TODO: Make the input an option for if no argument is provided or if missing.

Known issues:

If you have your default set to 'main' and the repository you forked from is 'master', you may encounter some issues that seem confusing at first.

This is what it looks like

fatal: The upstream branch of your current branch does not match
the name of your current branch.  To push to the upstream branch
on the remote, use

    git push origin HEAD:master

To push to the branch of the same name on the remote, use

    git push origin HEAD

To choose either option permanently, see push.default in 'git help config'.

To resolve it type: git push origin HEAD:master

This issue highlights possible updates to the script

  • A way to determine the head branch 'main' or 'master'.
  • I am also assuming that the remote/upstream repository will be using 'upstream/master' and not 'main'. We should have a chack for that as well.
  • Use one or the other when you change branches at the beginning

resync-fork's People

Contributors

akshu-on-github avatar mikeysan avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

akshu-on-github

resync-fork's Issues

Highlight the variables to be reassigned

Highlight the places where the user should reassigned the variables' values. Maybe you could use a TODO to do so. For example,

# TODO: Set variables to GitHub username
yourUser = "mikeysan"
remoteUser = str(sys.argv[1])
repository = str(sys.argv[2])

# os.path.isdir(path)

# TODO: Change working directory
chgDir = os.chdir('C:\\Users\\phil4\\Documents')
path = os.getcwd()

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.