Create Git Repository using visual studio and commit existing code.
From Solution Explorer click on git changes
Create a git repository on GITHUB and connect it
To create Repository, Login github and create repository
Provide a name for your Repo and save it.
Now copy the clone link from Code button.
After copy Click on Clone Repository on Solution Explorer In Visual Studio
Paste the copied link of Github Repository and click on clone button
After successfully Connected you can see Repo listed in Solution Explorer.
Can see this from Select repository options
Add Existing Code in Git Repository
To add existing code in git, we can create a Git repository using visual studio.
We have to set a git account with our system. We already have that.
From bottom click on Add to Source Control and then click on git
Verify the Detail of Git Repo and click on Create and Push
After successfully connect you can verify it by see at bottom of solution explorer
So we successfully created and connected a git repository for existing .net core code.
To see incoming and committing change see the bottom of solution explorer and also by clicking on it you can see basic commands of git like pull , push etc…
To see detailed view
Lets verify it on git account
Comments
Post a Comment