
The one (minor) gripe holding me back was the inability to use signed commits from within Visual Studio Code when code, git and the gpg agent are running inside of WSL2. I haven't completely moved away from MacOS but the experience is so enjoyable that I will likely switch to a Surface Book when it comes time to upgrade my MacBook Pro. Login to github and create a remote repository.I have recently been spending more and more time doing web development on Windows 10 using WSL2 and Windows Terminal. Linux / Mac eg.: git config -global core.editor vimĬheck git settings which displays configuration details git config -list


Windows eg.: git config -global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -nosession" Install git on your PC and setup configuration values in either Command Prompt (cmd) or VS Code terminal ( Ctrl + `) git config -global user.name "Your Name"

You can also verify by refreshing the GitHub repo online. Note: If it is the first time the local git account is trying toĬonnect to GitHub, you may be required to enter credentials to GitHub in a separate window.Ħ) You can see the success message in the Terminal. Git push -u origin master // pushes the commit-ed changes into the remote repo Git remote -v //this is to verify the link to the remote repo Sometimes these settings cause issue while pushing in.Ĥ) Copy the link to this newly created GitHub Repository.ĥ) Come back to the terminal in VS-CODE and type these commands in succession: git remote add origin //maps the remote repo link to local git repo Exclude creating 'README.md', '.gitIgnore' files. Alternatively you can run from CLI git commit -m "Your comment"ģ) Now you need to visit your GitHub account and create a new Repository. Press on 'Commit' button, provide comments, stage the changes and commit the files. It is understood that Git is installed in the system, configured with desired username and email Id.ġ) Navigate to the local project directory and create a local git repository: git initĢ) Once that is successful, click on the 'Source Control' icon on the left navbar in VS-Code.One should be able to see files ready to be commit-ed. The existing commands can be simply run via the CLI terminal of VS-CODE.

Here are the detailed steps needed to achieve this.
