Difference between revisions of "Using Github"

From Mochimo Wiki
Jump to: navigation, search
 
Line 3: Line 3:
 
'''Step 1:'''
 
'''Step 1:'''
 
Create a github account and verify email address.<BR>
 
Create a github account and verify email address.<BR>
 +
*Guide to create a Github account: [[Make_a_Github_Account|Make a Github Account]]<BR>
 
<BR>
 
<BR>
 
'''Step 2:'''
 
'''Step 2:'''

Latest revision as of 23:44, 14 April 2019

This page describes how to use github to perform basic forking, modification of the software and pull requests. What follows is the bare minimum of functionality to make a change to the Mochimo codebase and push it back to the github for review and inclusion in the mainline code.

Getting Started

Step 1: Create a github account and verify email address.


Step 2: Login to github and navigate to:

 https://github.com/mochimodev/mochimo/

Step 3: Click the fork button in the right hand corner of the screen to make a full copy of mochimo under your account.

Install git on Your Local Machine

sudo apt-get update
sudo apt-get install git

Clone Your Fork to Your Local Machine

git clone https://github.com/YOURUSERNAME/mochimo

Link your local clone to the source repository:
git remote add upstream https://github.com/mochimodev/mochimo.git

Confirm with: git remote -v

Sync to the Master Branch

git fetch upstream
git checkout master
git merge upstream/master

Making and Pushing Code Changes

Changing and Verifying a File

Make any change to a file on your local system.

Check to see that you have uncommitted changes:
git status

Now go to the directory with the changed file and add those changes to a new commit:
git add .

Now commit the change to the local master branch:
git commit

Enter a comment at the top of the text file and save/exit.

Pushing a Change Back to Master

Now push the changes up to your github online master branch:
git push origin master

Submitting a Pull Request

If you want your changes merged to the master branch of the main line code, submit a pull request from the online portal, by navigating to your repository and clicking on:
"New pull request"

Review your changes, and then click "Create pull request", and you're done! A member of the Core Contributor team will review and/or approve the merge of your changes. If approved, a bounty will be assigned to you on the Discord "Open-Bounties" channel.