Author Topic: VS Code (AutoLisp Extension): Git setup  (Read 1440 times)

0 Members and 1 Guest are viewing this topic.

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
VS Code (AutoLisp Extension): Git setup
« 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.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

d2010

  • Bull Frog
  • Posts: 323
Re: VS Code (AutoLisp Extension): Git setup
« Reply #1 on: July 19, 2021, 03:23:53 PM »
BrisCad not accespt VS.
How  to use the Git inside NotePAd++ or Blade?
:knuppel2:

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Re: VS Code (AutoLisp Extension): Git setup
« Reply #2 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.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org