Loading, please wait...

A to Z Full Forms and Acronyms

How to setup Git on local system?

In this article, we’ll learn about installing Git and Git Extensions on the local machine so that we can link our project in the visual studio with the Bitbucket accout.

How to setup Git on the local system

First of all, we need to download and install the Git Extensions which is a standalone UI tool for managing Git repositories. Git Extensions could be downloaded from this URL, http://gitextensions.github.io/ .

Also, we need to download and install Git which is a version control system. Git could be downloaded from this URL, https://git-scm.com/download/win .

After this, we need to create an account on Bitbucket Server so that we can create a new repository. The BitBucket repository will be the central repository for all the files, which means that other contributors of the project can access the repository if we give them the permission. We can create a new repository by clicking the + sign and then giving it an appropriate name.

Now, we clone the repository, this way we are creating a connection between the Bitbucket Server and the local machine. We are adding the remote repository to the local repository. Hence click the option displaying ‘Clone’ and copy the URL appearing on the dialog box.

Now come to a location on your system and create a new folder providing it a relevant name. I am creating the folder in D drive and name it as the ‘Git Project’.You can provide it any relevant name. It is necessary to clone the Bitbucket repository within your system so that the Bitbucket repository could be mapped with the local repository and hence the changes made to the project in the system could be updated on the cloud repository.

Now open a command prompt and paste the URL copied from the Bitbucket account in order to complete the cloning. Finally, when it is done, you need to open Visual Studio and create a new project. Then, open the project in file explorer and copy it inside the Git Project so that we have the project inside the local repository

Now we open the Git extensions installed earlier and open the repository. We open the Console window in Git Extensions and write the git commands.

Finally, we made the first commit and pushed the code to the remote repository.

It is essential to note that initially, we work on the project on visual studio then push the changes through the Git extensions on the cloud repository and finally we get the updates on the cloud repository.

A to Z Full Forms and Acronyms

Related Article