Skip to content

Latest commit

 

History

History
91 lines (70 loc) · 2.9 KB

step1.en.md

File metadata and controls

91 lines (70 loc) · 2.9 KB

STEP1: Git

In this step, we will learn how to use Git and Github.

📖 Reference

Install Git

  1. Install git in your environment and run the following command.

    $ git version
    • For Mac users: Install brew and brew install git
    • For Windows users: Download installer
  2. Set your name and email address using git config. Check if your email address shows up.

    $ git config user.email
    <your-email-adress>

Fork this mercari-build-training-2022 repository

  • Fork mercari-build-training-2022 (TODO: Update link)
  • You will see be able to see https://github.com/<your github id>/mercari-build-training-2022 if successful.

Use basic commands in Git

  1. Clone https://github.com/<your github id>/mercari-build-training-2022 onto your local using the following command.
    $ cd <your working space>
    $ git clone https://github.com/<your github id>/mercari-build-training-2022

‼️ Caution

Please definitely run the following command after cloning repository.

cd mercari-build-training-2022
git config --local core.hooksPath .githooks/ 

This is required to use githooks in mercari-build-training-2022 repository.

  1. Make a new branch named first-pull-request and checkout into this branch
    $ cd <your working space>/mercari-build-training-2022
    $ git branch first-pull-request
    $ git checkout first-pull-request
  2. Replace @<your github id> on README.md with your Github ID.
  3. commit the changes you made with the following commands.
    $ git status # Check your change
    $ git add README.md # Add README.md file to the list of files to commit
    $ git commit -m "Update github id" # Brief description about the changes
  4. push changes to Github.
    $ git push origin first-pull-request:first-pull-request
  5. Open https://github.com/<your github id>/mercari-build-training-2022 and make a Pull Request (PR).
    • base branch: main
    • target branch: first-pull-request

Review a PR and have your PR reviewed

  • Once you made a PR, ask a teammate for review.
  • If at least one person approves the PR, merge into the main branch
  • Open your teammates' PRs and check the files changed, and approve if you think the changes look good.

📖 Reference

🔰 Points

Check if you understand the following concepts.

  • branch
  • commit
  • add
  • pull, push
  • Pull Request

Next

STEP2: Building local environmentSTEP2: Building local environment