how to set git up in vs code. help i cant set it up. When i try to push a commit it shows cant find repository and shows a publish branch button and it opens a windows saying set core.fwmonitor to true. how to push a chnage to you git repository main branch
CodePudding user response:
First of all to being able to use Github with VSCode is to set-up Git on your computer and enable in it VSCode.
- Enable Git in VS Code
- Go to File > Preferences.
- Go to Settings.
- Type Git: Enabled in the search bar.
- Make sure that the box is ticked.
References :
check the bellow reference example for mere steps
https://www.jcchouinard.com/install-git-in-vscode/
https://code.visualstudio.com/docs/editor/versioncontrol
CodePudding user response:
Seems like you have not initilize git till now in your project ,
simply run git init
in your project folder
the message should say Reinitialized existing Git or now initilized.
if not, then check weather you have git set it up properly or not.
now you can stage and then commit changes to your repo.
if you want to push code to remote branch then, you have to first set origin where you want to push.
git remote add origin your_repo_url
Hope it works.