Skip to content

Instantly share code, notes, and snippets.

@shawnkoon
Created January 25, 2017 03:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shawnkoon/0a69369b7eb3b049287fd6a6aa1d3966 to your computer and use it in GitHub Desktop.
Save shawnkoon/0a69369b7eb3b049287fd6a6aa1d3966 to your computer and use it in GitHub Desktop.

Let's get started with github!

There are many different ways of working on github depend on whether you are working on your own repository, someone else's repository (without write permission), someone else's repository (with write permission), and etc...

So, let's talk about third way, 'someone else's repository (with write permission)'

  1. You need to make a Fork of a project. I would recommend you guys reading these 2 documentations that talks about what Forking does and how to work with it. Forking a repository & What it is for Syncing with main repository

  2. Once you fork them, clone your FORKED repository on to your work environment.

  3. Make Changes on your FORKED repository.

  4. Once you are done, add/commit/push up to your own master branch of FORKED repository.

I use these commands on git bash. git add --all git commit -m "Added blablabla" git push origin master

  1. If you feel like you are ready to push up to MAIN press New pull request button on web. image

  2. Go ahead and fill out somewhat descriptive title, comments and then publish your pull request.

  3. If there is conflict, we will have to resolve conflict before merging.

======================================================================

alrighty

so technically

once you are done coding

you go into your repository via bash

and type git status

which brings up all the changes you have made to that repostiory

then what you do is you have type git add <filename>

but by typing git add --all you are adding all of them

git add : just means you are adding the changes into the Queue almost

it's like you go to movie theater but ahvent bought the ticket yet

next is you have to commit things you have added

by typing git commit -m "mssg"

-m just means you are putting msg to the commit

git commit : making commitment

it's like since you are at the movie theater, now you buy the movie ticket

so at this stage

if you type git status again,

it will show things you have commited with green text

which means you are ready to push up to master branch (which will be your forked version)

so if you type git push origin master

it pushes all the update to your forked repository

it's like you are now actually going into theater to watch movie.

but still

nobody can see your change since your forked repository is private

thus you have to hit new pull request to actually update your changes up to master in the EWU-Team2 's repostiroy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment