GitHub is a web-based Git repository hosting service. It offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features.
In this post, I am going to tell you about source code save with GitHub Repository. Many developers create any application/project on their own system and they want to backup that project. But developers create many folders into the subfolder created for saving project and backup. In this situation he forgets and it's difficult to search where the project and the backup file were. This method is used for system crash and other stages. It will not lose your project/application.
Step 1:
Step 2: After clicking on the Create an Account button, you can see the following is visible:
Step 3: When you click on the "
New repository",
Step 4: Check the Email Address for Verification.
Step 5: After the verification click again on New Repository and give the Repository Name. For example,
BasicApplication and check the
Public if you want free, else for
Private you have to pay the amount. After that click
Create repository button.
Step 6: HTTPS SHH path with the extension .git as in the following figure:
Step 7: Create a new project in your Visual Studio. Check on
"Create directory for solution" and
"Add to source control". After that click Ok.
Step 8: After clicking the Ok Button check on the
"Git" and click
OK button.
Step 9: Both Method for Team Explorer can be seen and click on the Connect with GitHub.
Step 10: Enter the Username/E-mail address and then click on
Login.
Step 11: After the
Login, click on Clone for giving the project path from you system.
Step 12: Click on Browse and give the project path.
Step 13: As shown in the figure for path, click OK and then click the
Clone button.
Step 14: After that you can see that your application is successfully cloned. Here's the figure:
Step 15: Next right click on the project go to the
Source Control and the click on the
Commit. Here's the figure:
Step 16: Write the comment for
Commit message. This is required with comments and it will be not
commit. Here's the figure:
Step 17: After the complete comment click the
Commit button. Click on the
Sync as in the following figure:
Step 18: When you click on the
Sync, you can see the
Team Explorer - Synchronization. Enter the path of GitHub under "
Publish to Remote Repository" and click on the
Publish button,
Step 19: Copy the HTTPS SSH URL as in the following figure:
Step 20: Paste the Visual Studio Publish to Remote Repository, then click on the
Publish button. After that you can see the next screen as shown in step 21.
Step 21: After clicking the Publish button, the following message will be visible: "
The origin remote has been added and the current branch has been published". Here's the figure:
Step 22: Click on the
View or refresh the GitHub page.
Step 23: After the View or Refresh the page you will see Repository is created with time, comment and project name as in the following figure;
Thanks. If this is a helpful post for you then like and comment on my efforts.