Skip to content

Installation

Swapnal Shahil edited this page Aug 14, 2021 · 3 revisions

Fork, Clone, and Remote

  1. Fork:- If You want to contribute to this project you will need to have your own copy of the project as your Remote repository over GitHub. For this purpose, you can fork the project by clicking the Fork Button that you can be found on the top right corner of the landing page of this repository. Refer to the below picture:-
    forkImage

  2. Clone:- After forking the project, run the following command inside any specific directory :-

    $ git clone https://github.com/YOUR_GITHUB_USER_NAME/OpenMF.git
    
  3. Remote:- By default after cloning the remote pointing to your remote repository is the origin remote. To keep track of the original repository, you should add another remote named upstream. For this project, it can be done by running the following command -

    $ git remote add upstream https://github.com/scorelab/OpenMF.git
    

    You can also check out whether upstream remote is correctly added or not by using the following command:-

    $ git remote -v
    

    You should see the following output :-

    origin  https://github.com/YOUR_GITHUB_USER_NAME/OpenMF.git (fetch)
    origin  https://github.com/YOUR_GITHUB_USER_NAME/OpenMF.git (push)
    upstream        https://github.com/scorelab/OpenMF.git (fetch)
    upstream        https://github.com/scorelab/OpenMF.git (push)
    

Sync with Upstream

Always keep your local copy of the repository updated with the original repository.

Before making any changes and/or in an appropriate interval, run the following commands carefully to update your local repository.

# Fetch all remote repositories and delete any deleted remote branches
$ git fetch --all --prune
# Switch to `master` branch
$ git checkout master
# Reset local `main` branch to match `upstream` repository's `master` branch
$ git reset --hard upstream/master
# Push changes to your forked `OpenMF` repo
$ git push origin master

Note: Always keep remember to sync your local repository to the upstream repository before raising a PR.

Clone this wiki locally