git study notes - installation & Create Repository

First, install

1, Debian or Ubuntu Linux installation instructions:

sudo apt-get install git

2, other Linux versions installed:

./config
make
sudo make install

3, in accordance with Git on Mac OS X

In two ways:

1) installed directly homebrew Address: https://brew.sh/

2) in the AppStore download Xcode, installed by Xcode.

4, Windows installation

https://git-scm.com/downloads

Download images, find git-base installation.

$ git config --global user.name "Your Name"
$ git config --global user.email "[email protected]"

 

Second, create a repository

1. Create a directory

Common commands:

mkdir
pwd

pwd is to look at the directory.

2, initialize git repository

We will create a good repository using git init to initialize the warehouse.

git init

After initialization file .git have a role: it is used to track and manage Git repository.

If you do not see this file in your directory, indicating that the file is hidden, you can use ls -ah to see.

ls -ah

3, put the files on Git repository

3.1 add files to the Git

git add readme.txt

3.2 documents submitted to the repository

git commit -m "本次提交或修改文件的简单说明"

 

Published 327 original articles · won praise 133 · views 630 000 +

Guess you like

Origin blog.csdn.net/qq_30507287/article/details/85042302