Ubuntu 14.04LTS + Git, ubuntu14.04ltsgit

Source: Internet
Author: User

Ubuntu 14.04LTS + Git, ubuntu14.04ltsgit

Git is a common code hosting tool. As a programmer, Git is essential.

Install Git method is very simple, the official website has to write: http://git-scm.com/download/linux

Follow the instructions on the official website to use sudo apt-get install git.

Sudo is not required on the official website, but we usually need sudo permissions to install the software. Otherwise, the software cannot be installed;

Then, wait. After Git is installed, you can use git -- version to view the version of git;

After installing git, we usually need to configure the username and email of git as follows:

Configuration username: git config -- global user. name your-username

Configuration email: git config -- global user. email your-email

If you want to view the items you configured, you can view the git configuration list: git config-l

Clone remote project to local: git clone Project address

Add a file or file: git add file or file add

Submit: git commit

Push to remote server: git push

Pull from remote server: git pull

Note that if there is no branch in your remote project, you cannot push it. Therefore, you need to create a branch:

Git branch origin/master

Git push origin/master

NOTE: For the above operations, you must go to the project folder or specify the location when performing the operations.

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.