-
Notifications
You must be signed in to change notification settings - Fork 1
Developer HowTo: git with Eclipse
This is not intended top be a git tutorial. This pages are used to document How I (@RobertK66) propose that 'We' use this repository on github.
That said I plan to use it as a 'EGIT' Tips&Tricks collection because I try to get my hands on the git implementation in the IDE we have to use in this project (see also SetupMcuxpresso). As this are long running projects we regularly upgrade our tools to newer versions. At this time (2022-08) I use "MCUXpresso IDE v11.5.1 [Build 7266] [2022-04-13]".
The obc_1769_core Project uses the library code from https://github.com/RobertK66/ado-chip-175x-6x as a git submodule. You have to tick the 'clone submodules' checkbox when first importing code from this repository into your workspace. The library code and the local git cloned is contained in the sub folder ado-chip-175x-6x and contains 3 separate Eclipse Project. Only the one named ado_chip_175x_6x is used by our project and you can close the other ones (with 'Close Project' from context menu).
If you either make a 'Switch to .. branch xy' from Project-Context-Menu or a 'Checkout Branch' from the Git-Repository-View, the submodule's branch is not switched automatically when needed! When the new branch needs another version of the submodule, you see this as a immediately appearing 'changed marker' ('>') on the project node.
Another hint that you have this discrepancy you can find if you have the 'repository ado-chip-175x-6x' shown under Changes (either staged or unstaged) in the Git-Staging-View:
I have not found any actions to resolve this from here in the Git Staging View. What I do to resolve is: Go to the Git-Repository-View, find the 'changed marker' on the submodules folder and there you have a Context Menu Item: "Update Submodule". Clicking this finally switches the ado library to the needed version for the selected branch! (The changed mark disappears and the changed areas in the Staging view are empty now!)