In my previous posts I wrote about how to prepare a developer station with a Raspverry Pi 4. I wrote on how to install Visual Studio Code, how to install .Net Core and how to build and run C# projects. Of course, the next step is to work with Git.
The command to install git is
sudo apt-get install git
However, I already have Git installed. I haven’t checked, but it seems to me that the latest Raspbian distro includes by default git. I was hoping that VSCode will recognize and use this, but in order to work with Git in VSCode I need some extra work in the IDE settings.
I was able to clone some repositories from GitHub and Azure DevOps, directly from bach
So, let’s fix Visual Studio Code and Git integration. This one is very easy, I just need to go to Settings, search for Git and define the Git path for VSCode.
In order to find the git path, we need to use the [which] command
pi@rpidev3:~ $ which git
My got location is [/usr/bin/git].
I’m not a command line dude! I like User Interfaces, so now it’s time to open one of the cloned repositories in Visual Studio Code. I can see that VSCode recognices Git and I can start to commit my files.
This is also a perfect moment to define Git user name and user email.
git config --global user.email "firstname.lastname@example.org"
git config --global user.name "your name"
I like to do this in the Terminal in VSCode, just to check all is working fine.
Greetings @ Burlington
- El Bruno, How to install .Net Core in a Raspberry Pi 4 and test with HelloWorld https://elbruno.com/2019/08/27/raspberrypi-how-to-install-dotnetcore-in-a-raspberrypi4-and-test-with-helloworld-of-course/
- El Bruno, Installing Visual Studio Code in a Raspberry Pi https://elbruno.com/2019/08/20/vscode-installing-visual-studio-code-in-a-raspberrypi-a-couple-of-lessons-learned-code/
- El Bruno, Build and Run C# ,NetCore projects in a Raspberry Pi 4 with Visual Studio Code https://elbruno.com/2019/08/28/vscode-build-and-run-c-dotnetcore-projects-in-raspberrypi/
My posts on Raspberry Pi
Dev posts for Raspberry Pi
- How to grant permissions to a folder after git clone, to perform dotnet restore on a Raspberry Pi
- How to install .Net Core 3.1 in a Raspberry Pi 4
- Installing Visual Studio Code in a Raspberry Pi 4, run as root, fix black screen
- How to install .Net Core in a Raspberry Pi 4 and test with Hello World
- Build and Run C# NetCore projects in a Raspberry Pi 4 with Visual Studio Code
- Let’s do some Git dev in Raspberry Pi 4 (GitHub and Azure DevOps!)
Tools and Apps for Raspberry Pi
- Where is my Task Manager in RaspberryPi? Let’s try htop
- Multi-monitor in Raspberry Pi 4 rocks !
- Double Commander on RaspberryPi4, because files are important
- How to install Docker in a Raspberry Pi 4
- Installing Visual Studio Code in a Raspberry Pi
- Installing Visual Studio Code in a Raspberry Pi, run as root, fix black screen (Updated)
- 6 commands to install OpenCV for Python in a Raspberry Pi 4
Setup the device
- How to automatically connect to WiFi, enable SSH on 1st boot, SSH connect and update
- How to enable auto start with HDMI safe mode
- Running a Python script in a Python Virtual Environment on reboot / startup