I set up a github repository to match the project I am working on in Visual Studio 2022. I did something wrong and only the project file exists. I followed a tutorial. But the tutorial was disappointing and the instruction was to drag the content of my project and I suppose I only uploaded the project file.
That was then. This is now. So far this is what I have done. In Visual studio I opened a command window by click on CTRL + `. THen using the.git file and its location from my github repository, I typed at the command line:
That is the result if me putting "git clone https://github.com/Wm-M-Thompson/SharePointListCreation.git" at the command line window inside Visual Studio.
I asked AI and this is what they suggested:
![ghitub ai question.png ghitub ai question.png](https://www.tek-tips.com/data/attachments/0/461-9a27ad8bf0e9d816e76c949b84bd40ae.jpg)
As the case sometimes is, following the direction of AI does not result in positive results. When I right-clicked on the solution, the option to "Add Solution to Source Control" did not appear. Instead, I got this:
![git hub 01.png git hub 01.png](https://www.tek-tips.com/data/attachments/0/464-3bc15812efe74bb4464f1de31dfdc0f4.jpg)
Now, when I click on this, option to "Create Git Repository..." I am not able to set up a GitHub connection because the system recognizes that it already exists and the "Create and push" button is greyed out, but when pick "existing remote" I am able to make the connection and (supposedly) push my code to github.
![git hub 02.png git hub 02.png](https://www.tek-tips.com/data/attachments/0/465-642cf433889610f820246452ba3a0453.jpg)
![git hub 03.png git hub 03.png](https://www.tek-tips.com/data/attachments/0/466-ba60ab4619d1976d4d4dd017f722882a.jpg)
This seems to work. There is a notice that appears in the IDE in the bottom left that suggests that the files is being uploaded to the github repository.
![git hub 04.png git hub 04.png](https://www.tek-tips.com/data/attachments/0/467-f9bc2eea544864916dd083790b426b2d.jpg)
On github there seemed to be the files there but, at the same time, when I look closer at the content, the files were NOT there. Anyway, here is a screen shot of what looks like the files ARE there:
![git hub 05.png git hub 05.png](https://www.tek-tips.com/data/attachments/0/468-17a7d7336e95743a01f987a7f4640d3a.jpg)
So I uploaded the .cs and .sln files by hand. Now, how do I do periodic pushes and updates to github from my Microsoft Visual Studio 2022 IDE?
That was then. This is now. So far this is what I have done. In Visual studio I opened a command window by click on CTRL + `. THen using the.git file and its location from my github repository, I typed at the command line:
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
PS C:\source\repos\SharePointListCreation> git clone https://github.com/Wm-M-Thompson/SharePointListCreation.git
Cloning into 'SharePointListCreation'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (3/3), done.
PS C:\source\repos\SharePointListCreation> ^C
That is the result if me putting "git clone https://github.com/Wm-M-Thompson/SharePointListCreation.git" at the command line window inside Visual Studio.
I asked AI and this is what they suggested:
![ghitub ai question.png ghitub ai question.png](https://www.tek-tips.com/data/attachments/0/461-9a27ad8bf0e9d816e76c949b84bd40ae.jpg)
As the case sometimes is, following the direction of AI does not result in positive results. When I right-clicked on the solution, the option to "Add Solution to Source Control" did not appear. Instead, I got this:
![git hub 01.png git hub 01.png](https://www.tek-tips.com/data/attachments/0/464-3bc15812efe74bb4464f1de31dfdc0f4.jpg)
Now, when I click on this, option to "Create Git Repository..." I am not able to set up a GitHub connection because the system recognizes that it already exists and the "Create and push" button is greyed out, but when pick "existing remote" I am able to make the connection and (supposedly) push my code to github.
![git hub 02.png git hub 02.png](https://www.tek-tips.com/data/attachments/0/465-642cf433889610f820246452ba3a0453.jpg)
![git hub 03.png git hub 03.png](https://www.tek-tips.com/data/attachments/0/466-ba60ab4619d1976d4d4dd017f722882a.jpg)
This seems to work. There is a notice that appears in the IDE in the bottom left that suggests that the files is being uploaded to the github repository.
![git hub 04.png git hub 04.png](https://www.tek-tips.com/data/attachments/0/467-f9bc2eea544864916dd083790b426b2d.jpg)
On github there seemed to be the files there but, at the same time, when I look closer at the content, the files were NOT there. Anyway, here is a screen shot of what looks like the files ARE there:
![git hub 05.png git hub 05.png](https://www.tek-tips.com/data/attachments/0/468-17a7d7336e95743a01f987a7f4640d3a.jpg)
So I uploaded the .cs and .sln files by hand. Now, how do I do periodic pushes and updates to github from my Microsoft Visual Studio 2022 IDE?