The starting address of this article: Non-life and different
Update date:2016-05-27 03:33:00
Install git under Linux to install Git
Enter $ git --version to see if the system already has git installed.
If not installed, the Debian system is installed using the following command:
$ sudo apt-get install git, the Red hat system uses: $ sudo yum install git .
Install Git under Mac
Under Mac You can install homebrew and install git via homebrew. You can also install git directly in Xcode.
Install git under window
From Https://git-for-windows.github.io
Download Msysgit.
You can also download some artifacts such as Cygwin or cmder full version that comes with Git.
To create a version library
In order to avoid some unexpected trouble, try to use pure English name.
First step: Create
mkdirpwd
Step two: through $ git init command to turn the command into a git repository, which is to initialize a git repository.
Step three: Add files to the Git repository
Create a new file Test.txt
And then
" Commit "
Remote WarehouseFirst step: Create SSH Key
$ ssh-keygen -t rsa -C "[email protected]", add the contents of the. SSH directory to the id_rsa.pub in GitHub's add SSH key.
Step Two: Create a new repository with the local name on GitHub to $ git remote add origin [email protected]:username/repositoryname.git associate the remote library with the execution.
Step three: Execute the git push -u origin master push local library to the remote library, then push again without parameter-U.
(If Permission denied (publickey). you are prompted for permission problems, you can do it $ ssh-add ~/.ssh/id_rsa again and push again.)
If fatal: Could not read from remote repository. so, please ensure that the. git/config inside url = [email protected]:username/repo.git . )
Git Learning Notes