Use github UI to fork this repo to your repository, look top right screen..
git clone https://github.com/[username]/[this-repository]
create upstream remote..
git remote add upstream https://github.com/cakrads/git-example.git
check use
git remote -v
it should looks like this:
origin https://github.com/[username]/git-example (fetch)
origin https://github.com/[username]/git-example (push)
upstream https://github.com/cakrads/git-example.git (fetch)
upstream https://github.com/cakrads/git-example.git (push)
explanation: so we will have two repo, origin and upstream, origin is our repo, the ownership is us, the developer. upstream is main repo, the ownership is the maintener. we can pull from origin and upstream, but we can only push to origin. If we wan't push our changed/feature to upstream(main) repository we must use pull request to upstream, and let the maintener review our code (code review).
git checkout develop
Create new branch, the branch name is feature-[your-name]
git branch -b feature-cakra
check if your branch has been created
git branch
- Create your own folder in person folder
- create index.js or index.php. Use one, PHP OR JS
- Create algorithm for show number 1 until n,
but change all a multiple of two to "GOOD", and a multiple of four to "BEST".
And change a multiple of two and four to "AWESOME".
example, if we put n=10 will show:
1 GOOD 3 BEST 5 6 7 AWESOME 9 10
- you can copy the structure from person/cakra/index.js
- if you use PHP, just create something like point 4.
insert your bio in bio.txt file. just put your fullname
pull from upstream to get the newest update
git pull upstream develop
fix if there is a conflict
check your change once again, and add your change
git add .
*will add all your change to stage
git commit -m "add feature [your-name]"
git checkout develop
git merge feature-[your-name]
git push origin develop
create pull request to cakrads/git-example, and wait till merge