Later, not now · about 15 minutes

Keep your work.

Enough git to save your team's code, and nothing more. Four commands do almost everything you need for three weeks.

Finish tutorial 01 first.

Your first message does not need git at all. Come back when your team has code worth keeping.

The idea

Your code lives in three places

Git feels confusing until you can picture this. There is the programme's copy, your team's copy, and the folder on your laptop. Work happens on your laptop and travels upward.

  1. The programme's copyITEE-IKAPO/ladybug-starterRead-only for you. Everyone starts here.
  2. ForkOnce, on the GitHub website
  3. Your team's copyyour-team/ladybug-starterOn GitHub. This is what you hand in.
  4. CloneOnce per laptop
  5. Your laptopladybug-starter/The folder you actually edit.
  6. PushEvery time you finish something. Sends your laptop's work back up to your team's copy.
You will have two copies of GardenSpine.h, and that is fine.

One is the library the Arduino IDE installed during setup — that is the one your sketch actually uses. The other sits inside your fork. Editing the copy in your fork changes nothing. Leave both alone and keep your own project files in the fork.

Step 01 · on the website

Fork it

Forking makes your team's own copy on GitHub. You cannot break the programme's copy by doing this.

  1. Sign in to GitHub. One account per person is fine. Agree as a team which account owns the fork.

    done when: you can see your avatar in the top-right corner.

  2. Open ITEE-IKAPO/ladybug-starter and press Fork. It is at the top right. Accept the suggested name.

    done when: the page title reads your-team/ladybug-starter.

  3. Add your teammates. On your fork, open SettingsCollaborators and invite them so everyone can push.

    done when: each teammate has accepted the invitation by email.

Step 02 · on your laptop

Clone it

Cloning downloads your fork into a folder you can edit. Install git first if the command is not found.

git clone https://github.com/your-team/ladybug-starter.git

Replace your-team with the name in your fork's address. GitHub will ask you to sign in the first time you push.

Prefer buttons to commands?

GitHub Desktop does everything on this page with a graphical interface. Both are fine. Pick one and let your whole team use it.

Step 03 · every working day

Save and share

These four run in the same order every time. Say what changed in the commit message, not that something changed.

01git status

Shows what you changed since the last save. Run it whenever you are unsure.

02git add .

Marks everything you changed as ready to save.

03git commit -m "servo folds after 700 ms"

Saves a snapshot on your laptop, with a note about what changed.

04git push

Sends your saved snapshots to GitHub, where your team can see them.

If git push is rejected because a teammate pushed first, run git pull, then push again.

The one rule

Never commit config.h

It holds your device password. The starter already tells git to ignore config.h and laptop/config.py, so under normal use this takes care of itself.

Check before you push. If git status lists neither file, you are fine.

If you pushed it by accident.

Say so to an organiser the same day. The password gets replaced, which takes two minutes. This is not a disaster and nobody will mind — an unreported password is the only version of this that causes trouble.

What your fork should hold by the end

Your team's repository is a deliverable

The charter pages list what each project needs.