Build git version management in windows+ server environment

Source: Internet
Author: User
Tags git cheat sheet

Getting Started with gitserver construction and use
One, the group-Hui server Installation gitserver, as a remote host.

To install the Gitserver Process reference blog:

Http://www.tuicool.com/articles/ERfmmim,

Http://www.cnblogs.com/softman11/archive/2013/11/26/3443229.html

Http://www.java123.net/573512.html

The steps are as follows:

1. Go to "package Center" to find the Click Install git Server

2, open the DSM ssh: Control Panel → Terminal ... → Start ssh function

3. Create a "shared folder" Gitserver as a git repository in a remote host.

Create a method: Control Panel → shared folder, generate directory directory is generally /volume1/gitserver

4. Create and configure a git server user

1) Control Panel → user account: Create a gitadmin user and set read and write permissions to the gitserver directory.

2) Add user in Gitserver Suite, main Menu →git Server: Tick user


Ii. creating a remote repository on a remote host

1, in the local development machine open Putty connection remote host, into the remote host Gitserver Warehouse directory /volume1/gitserver.

2. Create a project warehouse, such as the project name Mycode, to create a remote repository named Mycode.git. Execute the following statement:

mkdir  mycode.git           // new Remote repository directory CD mycode.git                // Enter this directory git–bare Init                 // Create a remote repository git update-server-info
Create a git repository

3, switch environment, login to the group-Hui server, add user gitadmin to mycode.git directory read and Write permissions.


Third, local machine for Windows system, install Msysgit, tortoisegit

1, download msysgit, link https://git-for-windows.github.io/

Download Toroisegit, link https://tortoisegit.org/download/

2. Installation Msysgit, reference documents

Baidu Experience http://jingyan.baidu.com/article/90895e0fb3495f64ed6b0b50.html

Blog Park http://www.cnblogs.com/candle806/p/4065052.html

Key points are described below:

1) Generate SSH Key, open msysgit management terminal git bashà execute command ssh-keygen–t RSA.

Generates two key file id_rsa,id_rsa.pub in the ~/.ssh/directory.

3. Installation of Toroisegit, reference document http://blog.csdn.net/renfufei/article/details/41647937

Important Reminders:

1) tortoisegit set à network àssh the client needs to select: \tortoisegit\bin\tortoisegitplink.exe

2) The default installation of Tortoisegit, using Putty (Plink) as the default SSH mode, Tortoisegit can automatically load Putty key, using the puttygen program can generate the corresponding public key and private key.


Iv. testing whether the local development machine is connected to a remote repository

1, in the Local development machine, select and enter the Operation directory? Right button? Open Tortoisegit, click Git clone

You need to handle two places to connect to a remote host.
1) Fill in the remote host URL in the format
ssh://Remote Host user name @ remote host Ip/volume1/gitserver (Gitserver shared folder directory)/project name
2) Load the Putty key, which is the key generated at the key point described by three, 2, 1).

3) You need to enter a password for the remote user (such as gitadmin) when checking out.


Five, git command parsing (git cheat sheet)

Build git version management in windows+ server environment

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.