Skip to content

Use Git

Dario Di Maio edited this page Mar 22, 2015 · 4 revisions

Use Git

Get Always the Latest Code

If you want to have always the latest code, you can fork the code and create your own repository clone. If you have never used Git before, GitHub allow you to do most of the activities directly from the browser:

  • For the repository that you are interested in (right click and select View Image to enlarge)

  • Rename the repository, you can use repository-yourname (right click and select View Image to enlarge)

  • Create a new branch, so that your code can be merged back in the main one (right click and select View Image to enlarge)

  • Set your branch as default (right click and select View Image to enlarge)

  • Get the code using Tortoise Git or any other client (right click and select View Image to enlarge)

Ensure to Checkout into your own branch and then place the folder directly into the Arduino IDE /libraries. You are now ready to have fun and contribute back.

Commit, Sync, Merge and Pull

Once you have your code, you can modify it directly into that folder and all changes will be tracked automatically once you commit the code. For each commit you can specify a description. The real power is that Git is distributed, so you can work offline and commit your code and other people can do the same on the same code (on a different branch) and merge it at later time.

  • Commit : Records your changes into the version control system, these changes are locally saved on your PC.
  • Sync : Push your changes into the server, so that everyone can have access to them. If you are working on a dedicated branch, your changes doesn't affect other people working on the code.
  • Merge : Once started Git take the updates and merge them automatically in most of the cases. If it cannot resolve automatically, it ask to resolve manually.
  • Pull : Get the updates from the main repository, you get the updates without lose your changes.
Clone this wiki locally