Git support?

Hello,

I would like to track my versions in git. It there a way to add git support within the interface? Or maybe execute code outside the interface in an IDE or command line (although it wouldn’t be interactive)?

As far as I know, NetLogo desktop application does not have support for Git or any other version control tool.

NetLogo is unlike other full featured IDE which has support for things such as plug-ins, version control, code completion, static code analysis etc.

I’d recommend (based on my own workflow) you use a dedicated GUI client for Git such as Source Tree, or Git Tower. A GUI client will both let you track changes visually and make performing Git operations simpler compared to command line.

There is currently none within the interface. NetLogo itself lends itself perfectly to management of the source code (SCM, one of them is git) because of its text-based encoding (also the hidden parts interface, behavior space, …) in the .nlogo or .nls files. I use external git tools (@nimeshneema mentioned SourceTree, but I prefer VS Code or the command line) in my workflow, and I teach all my NetLogo students to use git with their NetLogo modeling.
I would love to see basic support of git within the NetLogo IDE, at least as an optional module. This support could be limited to

  • visualization of tracked changes from last commit
  • support for pull/push add/commit

What would be the major challenge for implementation? What speaks fundamentally against implementing git support in the IDE?

One of the efforts we have recently made is to support external editors (e.g., better VSCode), which seems more manageable than revamping NetLogo Desktop IDE to integrate Git.

Personally, I think it may be strategically better to consider deeper integration with existing infrastructures (e.g., VSCode) than reinventing the wheel. For example, both features could be done if we have full-fledged editor support for VSCode (through LSP, which makes it further compatible with all LSP-compatible editors). How do you feel about this pathway?

I second this. Instead of blowing up the IDE, it is better to rely on external tools like VSCode. My workflow anyway. Language Server capability for NetLogo syntax highlighting, possibly a linter would be great and feasible in VSCode. Please link existing efforts if there are any.

The major showstopper for now is the reloading of code. It would be great if there was an (experimental) option in NetLogo IDE to auto-reload changed .nlogo and .nls files if they are already open in the IDE. Then changes from an external editor would be reflected in the Netlogo Model.
This is dangerous of course as people may mess with the special section headers or the graphical elements. Long-term improvement of the .nlogo format (e.g. representing it as a .json object) might be a distant future side-effect.

Autoloading would improve my coding (happening in VSCode) significantly!

I filed another feature request for auto-reloading Auto-reloading of changes source code