Eclipse & Gitlab Tutorial
This tutorial shows how to use source control software (GIT) from within Eclipse. There are several hosts that can provide GIT services, and Gitlab appears to be a great one! In this tutorial, I will show you how to CLONE my LPC project for the SJ-One board, and you can use the knowledge to work on your own GIT projects.
Contents
Setup Gitlab Profile
|
Clone GIT Repository
In this section, we will bring-in the Gitlab project in your computer through Eclipse. Eclipse uses TEAM as a Git client.
|
Import Gitlab project to Eclipse
If you cloned my LPC project, the final step is to IMPORT the project in Eclipse. As of now (June 2014), Eclipse has a bug where you cannot use "Import Project" while adding the Git project in the previous section, so we will do this manually.
Note that if you want to add multiple LPC projects at this GIT repository, just copy and paste the folders of your projects here, and then IMPORT individual projects. The next section shows you how to COMMIT and PUSH your changes if you have added subfolders of multiple projects at this directory.
- In the Project Explorer section, right click and choose "Import Project"
- Under General, pick Existing Projects into Workspace
- Click Next and browse the root directory of your project and click Finish
Check-in code to Gitlab
After you have a project in Eclipse that is connected to Gitlab, you can now perform changes, and check-in the source code. Making changes is as easy as editing a file. Eclipse will inform you which files have changed by using icons next to the files or folders.
|
Other helpful hints:
- If others' have checked-in source code, you can go to Team and Pull to pull-in their changes
- Do this often to continuously integrate other people's code in yours.
- By browsing to Team --> Synchronize Workspace, you can see your changes.