Gitlab the Getting started process for working with Git Windows clients

Source: Internet
Author: User
Tags http authentication git client

My technical blog is often reproduced by rogue website malicious crawling. Please go to the original: http://www.cnblogs.com/hamhog/p/3824934.html, enjoy neat typography, effective links, correct code indentation, and a better reading experience.

To be exact, most of the features haven't been explored yet, and it's just a simple process to find out for a moment ~

Let's build a branch.

It's OK to build with the command line. The method I used was built directly on the web side of Gitlab. Here's how:

Come to the Branch list page of the project (link is now the address of the training, as an example).

Click New Branch on the left.

Write branch's name after name for new branch, such as my name Yue.dai.

The existing branch name is written after the create from, and the new branch is separated from the branch. Like master.

Then point to create Branch.

After setting up the branch, the next step is to clone the repo to local. There are two kinds of authentication methods, SSH and HTTP. Feel better with SSH because you don't have to lose the password repeatedly ... The following are examples of each:

SSH authentication

You first need to generate SSH key. Open git bash and enter:

$ ssh-keygen-t rsa-c "[Email protected]"

Remember to replace my mailbox with your mailbox ~

Enter the address of the generated key later. If you don't want to change it, use the default. Nothing to enter, direct enter. After this is done:

Then come to c:/users/your name/.ssh/directory, open the Id_rsa.pub file. Select all, copy.

On Gitlab, select profile settings in the upper-right corner. Select SSH key on the top bar. Click Add SSH Key.

Title casually write anything. Key to paste in.

After this is done:

Then open the Git client git GUI. Select Clone an existing repository.

As you can see in the Gitlab project page, you can choose between two different addresses for SSH and HTTP. Here we first choose SSH, its address is this form: [Email protected]:campus201404/homework.git

Copy this address to the source location in the Git GUI. Enter the local directory in target directory. Then choose Clone, you can ~

HTTP Authentication

Method is the same as above, just source location to write the address of HTTP, such as: Http://gitlab.corp.qunar.com/campus201404/homework.git

Then you need to enter the user name and password multiple times ... For this training, the username is the name, like Yue.dai; the password is the mailbox password.

Cache and Commit

Cloning completed, the GUI saw a blank, but in the local directory just entered a bunch of files already.

Make any changes in this directory, such as modify files, add files, will be seen by Git. Click "Rescan" in the Git GUI and you will see the changes on the left side:

Click Cache changes, equivalent to the Add file. Then write the commit message and click "Submit" to commit to the local repo.

Here is a hint of a commit message: The first line summarizes the changes you made, the second line is blank, and the remaining lines describe the changes.

Reminds me of our original commit message format is, commit #34, Feature:xxxx bug fixed:xxxx ...

Upload

The default is upload to master. To upload to your own branch, branch--new ..., tick "match tracking branch name" and select your own branch below. Click "New".

Then you can click "Upload", the source side branch can choose your own branch.

See the green "success", it means success ~ This time can be in Gitlab your own branch to see the changes.

The Getting Started process ends here ~ Welcome to my blog:) Although not how to write ...

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.