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)'
-
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
-
Once you fork them, clone your FORKED repository on to your work environment.
-
Make Changes on your FORKED repository.
-
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
-
If you feel like you are ready to push up to MAIN press
New pull request
button on web. -
Go ahead and fill out somewhat descriptive title, comments and then publish your pull request.
-
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