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.