Virtual Geek

Tales from real IT system administrators world and non-production environment

Solved Visual studio Code make sure you configure your and in git

Recently I formatted laptop and all the settings for my script environment where gone, I developed lots of PowerShell script using my laptop and use Version control to track changes which is very important, especially when I daily change my codes. Although I solely write my code, still if i require it to be collaborated in future I can maintain some system for versioning, a version control system can allow me to development with my DevOps teams to build and ship better products faster.

I find Visual studio code is best so far for developing my powershell codes, I use Git as version control system. and using git on Visual studio is very easy, it provides GUI way. Git is already installed on my system ( here for example I have built my few small scripts, they are working fine. Now I want a version control so I can move with further development. To proceed with  GIT click on Source Control button on the left had side. 

visual studio code github control version git error powershell folder commit push initial

This shows me No source control providers registered. I will add one local git as a provider, By clicking very small git icon as shown, shows me where I want to create git related files (version control system). I will select the default folder for this (all my scripts are in same files.)

Powershell visual studio code Source control git choose folder for git initial push control

Once added workspace, As no files are staged on the git system and all files and folders are untracked with U message. Press + on change and type something useful message (ie: First Initial).

visual studio code powershell source control git first change, staging stage all changes

The next, I faced error when clicking on commit button. The error was "Make sure you configure your "" and "" in git." or "Git: *** Please tell me who you are", Clicking on open git log, shows Output whats going wrong.

Error Powershell visual studio code source code control git make sure you configure your

Output shows Git need to configured with global settings and few commands need to be run, To correct this open CMD prompt, by default git is installed under C:\Program Files\Git\bin. cd to the location and run below command.

cd C:\Program Files\Git\bin

git config --global ""
git config --global "Your Name"

visual studio code git bin git config --global error git config --global

You can follow same step by watching below video.

Useful articles
Powershell one liner: Create multiple user accounts
Active Directory Powershell: Create bulk users from CSV file
Active Directory Powershell: Aduser A value for the attribute was not in the acceptable range of values
Powershell Active Directory: ADGroup Managedby - Checkbox Manager can update membership list

Go Back


Blog Search

Page Views


Follow me on Blogarama