'I have a problem setting up git repository and pushing changes in visual studio code
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
Solution 1:[1]
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
Solution 2:[2]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Siraj Ali |
Solution 2 | Sujeet Mishra |