TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: JohnK on July 16, 2021, 02:52:05 PM

Title: VS Code (AutoLisp Extension): Git setup
Post by: JohnK on July 16, 2021, 02:52:05 PM
This tutorial will cover the initial steps to get GIT installed and configured on your machine.

It is a very good idea to adopt the use of GIT to keep track of your code changes and it will simplify your coding significantly.

First download GIT.
[ https://git-scm.com/downloads ]

Install it.

Once you have Git installed you need to configure it. To configure Git you create a file called `.gitconfig` in your %userprofile% folder.

The bare minimum you need in the `.gitconfig` file is a `name` and an `email`.

Code - Bash: [Select]
  1. [user]
  2.         name = John Doe
  3.         email = john.doe@emailexchange.com

Now when you are using VS Code you can use the Git interface.

If you use my Lisp project set up script--located in the following thread: [ https://www.theswamp.org/index.php?topic=55696.0 ]--to set up a lisp project, you shouldn't have to do anything else besides "use git" in your projects. Otherwise you will need to setup a folder and a git repository for each project.

Using the Git interface in VS Code is very easy to use. The attached screen shots will show you the steps. 1. Open the interface. 2. Stage a file. 3. Added a commit message and commit the change.
Title: Re: VS Code (AutoLisp Extension): Git setup
Post by: d2010 on July 19, 2021, 03:23:53 PM
BrisCad not accespt VS.
How  to use the Git inside NotePAd++ or Blade?
:knuppel2:
Title: Re: VS Code (AutoLisp Extension): Git setup
Post by: JohnK on July 19, 2021, 03:47:47 PM
I do not use NotePAD++ or Blade and Git doesn't have text editor interfaces; you normally use Git on the command line (or Git Bash).

If you are not going to use VS Code for development then I would I recommend you have a slightly different setup and workflow with tools like Git and stick to using Git on the command line. As an example I normally use a "repository store" and I keep regular backups (cloud/usb/etc). Git is a very powerful tool!  You can get a better description/idea here: [ https://www.theswamp.org/index.php?topic=54864.msg592513#msg592513 ]

And if you want to use NotePAD++ as your commit editor you can open GitBash and type the following:
Code: [Select]
git config –global core.editor <NOTEPAD++ directory>
This thread though just demonstrates the very crude interface Visual Studio and VS Code has offered.