Installation and use of Windows git

Source: Internet
Author: User
Tags git commands

I, I am based on the personal website of the Great god of Liu Xue git, and feel and send to do notes to write this blog, hope can help yourself and other people, Liao Xuefeng Personal official website http://www.liaoxuefeng.com/

Ii. Statement of My Computer configuration: windows8.1 64-bit system, git version: 1.9.5

Third, the First Direct network download Msysgit, Msysgit is the Windows version of Git. Download EXE file, run it directly, install it by default, then right-click →git Bash after installation, if the installation is successful.

Iv. Create your own working directory

To your default working directory parent folder, right-click →git Bush, enter

$ git config--global"Your Name"-global"[email Protected]"

This is the setting of personal information, lose one can.

Re-establish working directory:

$ mkdir testgit$ CD testgit$ pwd
/d/testgit

My working directory is on D drive. (The best way to use the path is not to have Chinese, otherwise it will be a puzzling problem)

The second step is to git init turn this directory into a repository that git can manage by command:

 in/d/testgit/.git/

So far, our management warehouse has been established.

Five, put my own writing project into the warehouse.

First you need to know two commands:

" Comment "
    • Add is to add the file to the buffer room
    • Commit is to update all the files in the cache to the warehouse

Then go to the parent directory where we want to upload the file (folder), enter Git bash and enter git init, and we'll create a repository for you.

then enter directly

$git Add "your Project" (folder)

$git commit-m "Add a Site"

Show update complete input $git log

Can see our previous operation of the specific content of the log, it is indeed uploaded a folder.

Because GIT commands more than one here mark a site, you can view some of the commands you need.

Vi. uploading the project to GitHub

Set up a remote connection first:

$ git Remote add origin https://github.com/logicvay2010/mysite

The user name and password will be requested after the link

Then enter:

$ GIT push origin master

The git push command pushes the local repository to the remote server.
The git pull command is the opposite.

Finally complete the upload, this is my GitHub page.

Vii. Summary

Git is a powerful and easy-to-use version management tool that is critical to the development of software projects, and now allows you to manage your team projects well with simple operations.

Installation and use of Windows git

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.