On Windows, Git-2.9.3-rebase-i-64-bit installation and initialization

Source: Internet
Author: User
Tags using git git commands

Install: (Omit step, direct next.) of unimportant steps)


650) this.width=650; "title=" First step "alt=" Wkiom1fh-b7rhkdwaablheahra0160.png "src=" http://s2.51cto.com/wyfs02/M01/86/ B5/wkiom1fh-b7rhkdwaablheahra0160.png "/>


650) this.width=650; "title=" 2 "alt=" Wkiol1fh-e7sbuluaaa53ajbyzm489.png "src=" http://s2.51cto.com/wyfs02/M02/86/B5 /wkiol1fh-e7sbuluaaa53ajbyzm489.png "/>


650) this.width=650; "title=" 3.png "alt=" Wkiom1fh-n3z6ddoaabh-gq8q4s575.png "src=" http://s2.51cto.com/wyfs02/M01/ 86/b5/wkiom1fh-n3z6ddoaabh-gq8q4s575.png "/>

#最后这一条 option is optional.

Baidu translation: In all console windows using TrueType fonts, my win10 tick, my win8 not checked, does not affect my normal use.


650) this.width=650; "title=" 4.png "alt=" Wkiol1fh-tmboytcaabp3odpydi613.png "src=" http://s5.51cto.com/wyfs02/M00/ 86/b5/wkiol1fh-tmboytcaabp3odpydi613.png "/>

#翻译一下这三个选项: (You can choose the first one)

1. Use git only from Git bash, which is the safest thing about your path will not be modified, you will only use git command line tool from Git bash

2. Using git from the Windows command prompt, this option is safe because it just adds some minimal git wrappers to your path and avoids the duttrring environment with optional UNIX tools. You can use git from git bash and Windows command prompt

3. Use git and optional UNIX tools from the Windows command prompt. Two git and optional UNIX tools will be added to your path. Warning: This overrides window tools such as Find and sort. Only use this option if you understand this effect




650) this.width=650; "title=" 5.png "alt=" Wkiol1fh-1pahjbtaabf0pgxvds227.png "src=" http://s1.51cto.com/wyfs02/M02/ 86/b5/wkiol1fh-1pahjbtaabf0pgxvds227.png "/>

#默认第一个即可.


650) this.width=650; "title=" 6.png "alt=" Wkiol1fh-8xc88l8aabjcyyyvvm599.png "src=" http://s4.51cto.com/wyfs02/M01/ 86/b5/wkiol1fh-8xc88l8aabjcyyyvvm599.png "/>

#默认第一个就行


650) this.width=650; "title=" 7.png "alt=" Wkiol1fh-9jiqtvraaa9g1uzftm538.png "src=" http://s1.51cto.com/wyfs02/M01/ 86/b5/wkiol1fh-9jiqtvraaa9g1uzftm538.png "/>

#虚拟机, the second item cannot be checked, the first item I have not checked, the second item can be checked. I only checked the second item on this machine.

The first is to say that the file improves performance in memory cache. The second idea is to install a certification that makes it easy to do something with Visual Studio and GitHub.

Initialization and simple use: (the installation has just been completed, so let's do it now.) )

1, Introduction:

Git comes with a git config tool to help set configuration variables that control the look and behavior of git. These variables are stored in three different locations:

/etc/gitconfig file: Contains a generic configuration for each user on the system and their warehouse. If you use Git config with the--system option, it reads and writes configuration variables from this file.

~/.gitconfig or ~/.config/git/config file: only for the current user. You can pass the--global option to have Git read and write this file.

The config file (that is. git/config) in the Git directory that is currently using the repository: for that warehouse.

Each level overrides the previous level of configuration, so. Git/config configuration variables override the configuration variables in/etc/gitconfig.

In a Windows system, Git looks for. gitconfig files under $HOME directory (typically C:\Users\ $USER). Git also looks for/etc/gitconfig files, but is limited to the root directory of MSys, which is the target location selected when installing Git.


User information initialization (long-term validity of this initialization)

$ git config--global user.name "51cto" $ git config--global user.email [email protected]


Modify Editor: (the default Vim, is now modified to Emacs, I have no use, you like can change, feel vim is good)

$ git config--global core.editor emacs


Check configuration information:

$ git config--list
git config user.name #这个就灵活运用, the more convenient is the list


Get help with Git commands:

$ git help <verb>$ git <verb>--help$ mans git-<verb>$ git help config #查看config的帮助在IRC寻求帮助: Access, Irc.free Node.net, #git or #github access the channel for help.


Initialize the warehouse: (work requires a warehouse to store what.) Give Git a directory, and then switch over to the terminal, just like the Linux CD command, then execute the following command)

$ git init 

The command will create a name of   .git   subdirectory, this subdirectory contains all the necessary files from your Git repository, which are the backbone of the Git repository. However, at this point, we just do an initialization operation, and the files in your project are not being tracked.

$ git add *.c$ git add LICENSE #git是对文件的追踪 (actual maintenance) $ git commit-m ' initial project version ' #git C Ommit is the submission of the file


Clone a warehouse of someone else:

$ git clone $ git clone https://github.com/aaaaa Aaa1 #克隆过来, got a aaa1 name

#这里提到了github, how to use the combination with GitHub (or coding.net), this Baidu a bit, a lot of tutorials.


#拓展阅读: Https://git-scm.com/book/zh/v2

The Chinese version details git usage, git and GitHub, and some basic theories.

This article is from the "love to Learn bear children" blog, please be sure to keep this source http://molilinzi.blog.51cto.com/8282931/1845314

On Windows, Git-2.9.3-rebase-i-64-bit installation and initialization

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.