blukat29 / cmps115

UCSC CMPS115 2015 Summer
2 stars 0 forks source link

[Tip] How to contribute #3

Open blukat29 opened 9 years ago

blukat29 commented 9 years ago

1. Download the project

1-1. If you did not clone the project

$ git clone https://github.com/blukat29/cmps115
$ cd cmps115

1-2. If you did clone the project

$ git pull

2. Look where you are

$ git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
nothing to commit, working directory clean

3. Make a new branch

$ git branch <proper branch name>

Example of such branch name is feat-weekly-chart. It must show what your code is about.

4. Move into the new branch

$ git checkout feat-week-chart
Switched to branch 'feat-week-chart'

5. Make changes

coding, testing, debugging... Check what you did, using git diff and git status

6. Add changed files on the stage

$ git add background.html chart.js
$ git status
On branch feat-week-chart
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   background.html
        modified:   chart.js

7. Commit the changes on the change

Write one-line summary of the changed parts here.

$ git commit -m "Add chart for weekly statistics"

8. Upload changes to Github

$ git push --set-upstream origin feat-week-chart

9. In Github, click "Compare & pull request" button

Write brief description about the change, so that people can look and see if they are good.

10. Wait for the Product Owner to merge the change into main branch.

More help here: https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository (Korean version: https://git-scm.com/book/ko/v2/Git의-기초-수정하고-저장소에-저장하기) https://www.atlassian.com/git/tutorials/setting-up-a-repository https://www.atlassian.com/git/tutorials/making-a-pull-request