Git Learning Notes

Source: Internet
Author: User

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

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.