Working with github on Windows

In this post we will see step by step to configure github for windows and the way to sync the project from windows to github repository. To start with very first you need to create a repository on github. To create repository login to github and click on New repository option

image

Once you click on New repository button you will get prompted to fill many information’s like repository name, description etc. You can make repository public or private by selecting respective radio button. If you are starting new then it is always good to initialize the repository with a README. It allows git to clone the repository immediately. Please refer below image for more on creating new repository

image

Once repository is created you will be navigated to repository page and can find all the information about repository as following image

image

At this point you have created repository in github and now you need to download and configure Windows Client of github on your machine. On the github page in the bottom you will find link to download windows client for github

 

image

After downloading and installing github windows client you will find icon on your desktop. Click that icon. Github windows client will be launched. In the left side you see local and github account. When you click on github account you will find all the repositories from the github.

 

image

To start working with github repositories, first you need to clone that. You will get clone button next to repository.

image

After successful cloning you will find button changed as shown in following image.

 

image

Double click on the repository to open it. After opening the repository you can notice in top a tool menu. From there you got option

  • Open in explorer
  • Open a shell here
  • View on github

image

To work with project select open in explorer. It will open the repository in windows explorer. Now suppose you have a visual studio solution you want to push on github, you need to follow below steps

Open VS project in window explorer and copy the solution.

image

You need to copy all files from VS solution open in windows explorer to github repository open in windows explorer.

image

After copying files to github repository open in windows explorer go to github for windows client and click on the refresh button

image

After refreshing double click on testproject repository. You may notice that a blue array next to repository name saying this repository has been modified. Click on the blue arrow or double click on the repository to navigate to detail repository page. On this screen you will find

  • Details of files to be committed
  • Option to commit the changes with comment

image

After providing comment you need to click on the commit button to commit the changes locally. After committing you will get message that one change committed locally though it is not synced.

image

To sync changes with github you need to click on sync button in top. If there is any locally committed change available then you will find sync button in blue else it would be in gray color. Once you click on sync button changes will get committed to github

image

You can verify sync in two ways. Either navigate to github and you will find all changes with comment there.

image

The other way is that you will see on github windows client in sync displayed.

image

The approach should be to put working files in local repository or cloned repository such that whenever you do any changes github for windows will detect that and you can locally commit and eventually sync with the github. In this way you can work with github and windows. I hope you find it useful. Thanks for reading.

 

One response to “Working with github on Windows”

  1. Very descriptive and excellent post! keep up the good works and thanks a lot!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com