How to use Github for windows for gitlab respoitory

Getting Ready

Download and install  or classic GitHub Desktop Windows

1. Get Repository HTTPS Address

1.1 Go to your GitLab project (repository) and tap on “HTTPS” to view that address for the repository

1.2 Copy the HTTPS address of your GitLab project repository

2. Clone Repository

select the text of the clone url, then click on it and drag it into the GitHub for Windows dashboard. Pretty easy!

ghfw-drag-drop-repo

You’ll see the repository listed in the list of local repositories. Double click the repository (or click on the blue arrow) to navigate to the repository.

ghfw-nuget-local-repo

The first time you navigate to the repository, GHfW prompts you for your credentials to the Git host, in this case, CodePlex.com. This probably goes without saying, but do not enter your GitHub.com credentials here.

ghfw-codeplex-credentials

GHfW will securely store the credentials for this repository so that you only need to enter it once. GHfW acts as a credentials provider for Git so the credentials you enter here will also work with the command line as long as you launch it from the Git Shell shortcut that GHfW installs. That means you won’t have to enter the credentials every time you push or pull commits from the server.

With that, you’re all set. Work on your project, make local commits, and when you’re ready to push your changes to the server, click on the sync button.

ghfw-nuget-sync-codeplex

While we think you’ll have the best experience on GitHub.com, we also think GitHub for Windows is a great client for any Git host.

All version control systems have a notion of a repository, a place where source code and all its history is stored. Distributed version control systems like git extend this idea to have a lot of repositories. Each developer working on a project will have his or her own private repository, and typically each project will also have a “master” repository to provide a central place for publishing the project. It’s these centralized repositories that are hosted on GitHub. (Though git doesn’t haveto be used this way; every person using it on a project could put in place the infrastructure to serve up access to their local repository if they really wanted. It’s just much easier to not do so).

The dashboard shows all your repositories, both local and remote.
Enlarge / The dashboard shows all your repositories, both local and remote.

Usually, performing the basic operations for managing a repository—committing changes, copying changes from a local repository to a remote one (“pushing”), or from a remote one to a local one (“pulling”)—are done at the command line. While delving into git’s more esoteric corners will demand the use of the command-line client, a friendly GUI for bread-and-butter tasks is a welcome thing. Setting up GitHub also involves a few additional chores, such as configuration of ssh keys.

GitHub for Windows addresses both areas. It handles the GitHub settings and configuration automatically, and it provides a basic graphical front-end to handle the main version control tasks. The GUI can create new repositories, commit changes made to a local repository, and synchronize changes between a local and remote repository.

GitHub for Windows shows you all the changes you've made to your local source that aren't committed to your local repository.
Enlarge / GitHub for Windows shows you all the changes you’ve made to your local source that aren’t committed to your local repository.
Add an informative commit message when you make your commit, or else your fellow developers will hate you.
Enlarge / Add an informative commit message when you make your commit, or else your fellow developers will hate you.
Once committed locally, the changes can be synced to the remote repository just by hitting the sync button. Behind the scenes, this will do the necessary git push and pull operations.
Enlarge / Once committed locally, the changes can be synced to the remote repository just by hitting the sync button. Behind the scenes, this will do the necessary git push and pull operations.

For experienced git users, the terminology used in GitHub for Windows might be a little surprising. In GitHub for Windows, the “push” and “pull” operations are combined into a singular “synchronize” operation that will perform the appropriate pushes and pulls to make the contents of the local and remote repositories match.

One of git’s biggest strengths is that it makes the creation of branches nearly instantaneous, and cheap in terms of disk space. This encourages a policy of regular branching. Each time you want to make a series of changes in order to, for instance, add a new feature, you can create a branch for that feature. You can then do all the work on the branch, a process that may take weeks or months if the feature is large, and finally merge that branch back into the “master” branch.

It's not the most feature-rich interface imaginable, but it gets the job done in the common case. git's merging capabilities are pretty clever.
Enlarge / It’s not the most feature-rich interface imaginable, but it gets the job done in the common case. git’s merging capabilities are pretty clever.

This would typically require the use of the command line. But again, GitHub for Windows provides a simple user interface for handling the common scenarios in a GUI.