Git is a free distributed version control system that can help Linux kernel development. The merge tracking capability is a highlight of Git. How do you install and configure Git in Ubuntu system? The following small series introduces you to the Ubuntu installation and configuration of Git, and a brief description of the use of Git.
a, Git installation:
1, the binary attached:
$ sudo apt-get install git-core
After the installation , enter git in the terminal to see the relevant commands. If you just need to use git to manage your local code, you can use it now. If you need to combine with the project on github, you need to do some other operations.
2, github account application
If you just need to copy the code of interest on github to the local, modify it for use, and do not intend to share the release, in fact, do not apply for an account Relationships, just git clone code to the local. $ git clone git://IP work (working directory name).
After all, using github is for open source purposes. First, register an account on github.com.
3, create a folder locally, and then do some global variable initialization
$ git config --global user.name = “username or user ID”
$ git config --global user.email = mailbox
These two options are automatically added to the code during future use.
4, create a public key for verification
This is a more complicated and troublesome place, because git access to the repository through ssh, so you need to create a local authentication Used files. Use the command: $ ssh-keygen -C ‘you email [email protected]’ -t rsa will create the corresponding key file in the user directory ~/.ssh/. You can use the $ ssh -v [email protected] command to test if the link is clear.
5, upload the public key
In the interface of github.com, select Account Settings in the upper right corner, then select SSH Public Keys and select the new one.
Title can be named casually. The contents of Key are copied from ~/.ssh/id_rsa.pub. After completion, you can use ssh -v [email protected] to test. See the message below to indicate that the verification was successful.
Second, Git configuration and use
Using github to manage your own projects, you can follow the steps below
1. Create a warehouse
In the folder where the project is created, use git init to build the repository. When you're done, you can see that there is one more .git hidden directory in the file home.
2, add files
Use git add . To add the initial file. Here . It means that all the files under the folder are added, we can also specify the file to add.
3, submit file
Use git commit -m ‘comment’ submit, you can submit the edited content.
4, delete or add github remote source
git remote add origin https://github.com/Git-Elite/CodeBase.git //blue part is the github-managed warehouse address
5, submit to github repository
git push -u origin master
The above is the Ubuntu installation and configuration Git method introduced, before using Git, you need to establish A github repository, then you can use git to manage Linux projects.
The fork() function is a fork function. An existing process can call the fork() fun
There are two different exchange methods in Linux system, namely NBMA and BMA. Dont look at the two
Usually, the Ubuntu system hard disk will not make a sound when it is read. If the
The characteristic of Linux system is that any operation can be implemented by commands. Linux syste
How to turn off IP access for Linux Apache server
How to configure LILO file for Red Flag Linux system
What should I do if Ubuntu fails to adjust and save the screen brightness?
Method for monitoring Linux temperature using psensor
Summary of lftp usage in Linux system
How to install and upgrade VMware Tools in Fedora
Linux installation steps using GitHub
Five Ways to Improve Linux System Security
Usage summary of chkconfig command under Linux
Linux installation and configuration of rsync and sersync methods
How to open the hidden login interface in win10 system?
Win8 system using CCB online banking 0130Z110S002 error code how to do?
Vista Alipay control certificate use problem Daquan
Why I changed the win7 system, there is no way to use online banking and Alipay.
Windows 8.1 Preview installation can not complete
Microsoft warned that the reset Win10 Mobile 10581 should not be upgraded directly to 10586
Win7 does not have a local connection, how to do win7 local connection no solution
Create a vpn connection 2003 to create a vpn single network card