Cloning GoDevTips repository in Windows

In this article, we are going to instruct how to clone the GoDevTips repository locally in Windows. This is important when you want to run codes from one of our articles. At the end of this article you will have a Git client software installed, the repository cloned and able to run Go codes provided from an article.

Installing Git in Windows

Git has a stand-alone installer for Windows which can be download through their official download page.

The installation is a straight forward process which is illustrated below:

To verify if Git is successfully installed, launch the Git CMD app.

Enter the following command in terminal:

git --version

Git client software

If you are already familiar with Git you can use the Git commands to clone the repository in windows. The most commonly used Git client softwares for cloning GitHub repositories are GitHub Desktop or Source Tree. For this example, we are going to use Github Desktop since that makes it much easier for beginners to get started.

Download GitHub Desktop .exe file from their official website.

After downloading the executable file, just launch it and follow the installation instructions.

Launching GitHub Desktop app

At first launch it will ask you to login with a GitHub Account, you can proceed with logging in with an account if you want or you can just skip this step. For now, we will be skipping this step by clicking on skip this step option. The app will then ask you to configure Git by entering your name and email address. Click on finish to start the app and the main screen appears.  

Cloning the GoDevTips repository

After installing the GitHub Desktop app, go to the GoDevTips GitHub repository and copy the clone URL.

Open GitHub Desktop and select the clone a repository from the internet option and paste the URL click on clone.

Import the project

Once the repository is successfully imported, you can just open the golangExercise folder in your selected code editor. In this example, we are going to open this folder in Atom, although the procedure is identical in all other code editors.

Running the project

For this example, we are going to execute the multiReturn project. Ones the project is imported, open the main.go file and enable the terminal in order to navigate to the file. To navigate to the file, enter the following commands:

  • cd golang
  • cd multipleReturn
  • cd english

And to run this project:

  • go run main.go

Relevant resources:

Follow us:

Leave a Reply

Your email address will not be published. Required fields are marked *