LPCXpresso versioning with Git (tutorial)

cancel
Showing results for 
Search instead for 
Did you mean: 

LPCXpresso versioning with Git (tutorial)

1,825 Views
fjrg76
Contributor IV

Hi,

I want to share with the community this tutorial I just finished for versioning our projects. The tutorial can be reached here:

https://fjrg76.wordpress.com/2017/08/04/versioning-lpcxpresso-with-git/

It also works for MCUXpresso, and with any other platform based on Eclipse. There are two tricky issues to observe when versioning:

1.- ALL files in the workspace shoud be versioned, not only your .c* and .h* files (except binaries).

2.- The original .metadata hidden folder must be included.

These two points are handled in the tutorial.

Please let me know if it worked for you.

Labels (2)
3 Replies

675 Views
converse
Senior Contributor V

I appreciate the effort you have put into this, but unfortunately, it is wrong.

1. Do not put the .metadata folder under version control.

  • it is not required
  • (despite what you say) it is not portable to other computers as, amongst other things, it contains hardcoded paths that are specific to your computer
  • it contains huge amounts of information that will severely bloat your repository. For example, it includes every change you make to you source files (much like a source repository does) - this is how all of the 'Local History' functions work

2. You'll find it is MUCH easier to use the eGit Eclipse plugin. This integrates git directly into your Eclipse (LPCXpresso, MCUXpresso etc) so you never need to use the command line. This is a good eGit tutorial: EGit Tutorial from EclipseSource 

Note: I guess the reason you thought you needed to include .metadata is that it contains details of the projects in your workspace. The correct way to let a workspace know about a project is to use the File-> Import.. Existing projects into Workspace

I hope this helps you use git in the correct way in Eclipse.

675 Views
fjrg76
Contributor IV

Hi Con Verse,

Unfortunately I couldn't find a way to git my projects without the .metada folder. You're right it's too big, but without it no projects are shown in LPCXpresso. The "Import" command doesn't allow me to work with the same project in different computers. What I want to do is to work with my projects in the git way: load -> upload -> load -> upload. The using of the "Import" command makes the git way useless, in the sense I described.

0 Kudos

675 Views
converse
Senior Contributor V

I re-iterate, NEVER put .metadata into a source repository. 

If you are unable to follow the tutorial, then I suggest you ask for help on the eGIT forum on eclipse.org: Eclipse Community Forums: EGit / JGit 

0 Kudos