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
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
Once repository is created you will be navigated to repository page and can find all the information about repository as following 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
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.
To start working with github repositories, first you need to clone that. You will get clone button next to repository.
After successful cloning you will find button changed as shown in following 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
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.
You need to copy all files from VS solution open in windows explorer to github repository open in windows explorer.
After copying files to github repository open in windows explorer go to github for windows client and click on the refresh button
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
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.
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
You can verify sync in two ways. Either navigate to github and you will find all changes with comment there.
The other way is that you will see on github windows client in sync displayed.
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.