Git (Code cloud-Open source China) Introduction of small knowledge _git

Source: Internet
Author: User
Tags hosting using git

Git Code Cloud Introduction:
2013 Open source China online large-scale development cloud platform-"code cloud", the code hosting, quality detection, code demonstration, team collaboration and other development tools integrated into the cloud platform, eliminate the complex development environment deployment, save costs, help software developers improve productivity, Lead the domestic cloud collaboration development trend. As of 2016, "code Cloud" cumulative 600,000 developers, carrying 1 million projects, has become a powerful, active professional code hosting platform.
One, Git@osc code hosting
Open source China Community team based on open source project Gitlab development of online code hosting platform.
Git@osc
Git@osc
A. You can submit and manage code via SSH or HTTP, or you can read and edit code online through the Web.
B. You can easily contribute code to other projects through the Fork and Pull Request features, and you can also create Issue and wikis for your project.
C. Open source is a spirit, but not an obligation, in the Chinese source code hosting platform you can create up to 1000 items, not limited to private or public.
Second, Team@osc team collaboration
Team@osc team collaboration Platform
Team@osc team collaboration Platform
Open source China [7] A team collaboration platform dedicated to developers, integrated with Git@osc and GitHub, providing task management, project collaboration, Work Weekly. Team discussion, mobile office and many other functions, easy remote management team. [5]
Three, Sonar@osc code quality management

What you can do with Git.
1, save your complete project file and code remotely.
2, upload your project file online.
3, Distributed Update Project.
4, you can copy items from git to the local.
5, ...
How do I use git?
git installation and Configuration window under the install from http://git-scm.com/download to download the Windows version of the client, and then continue the next step to install GIT, please note that if you are not familiar with the meaning of each option, please leave the default option
Ubuntu is installed under the terminal to perform apt-get install git
Centos/redhat installed under the terminal to perform yum install git
Fedora23 installed under the terminal to perform DNF install git or yum install git
FEDORA22/21 installed under the terminal to perform yum install git
Suse/opensuse installed under the terminal to perform sudo zypper install git
MAC OS X installed under the terminal to execute brew install git
(Note: Please resolve the environment variables as well as the brew tools problem) compile the installation (note: Only for non-window systems) from
Select a version download on the https://github.com/git/git/releases, unzip it and go to Git's directory and then execute the following code: make configure./configure make all sudo Stall
Note: If you encounter a problem that cannot be compiled, please find the dependencies of git by yourself through the search engine, if all the above is OK, open the terminal (open the bash installed together when you install git) input git–version should display the following similar information Git Version 2.5.0

Configure your own user name and mailbox and default Init
Before using git, we need to go into the file of the project that we want to upload, right click Git bush and then go to the terminal (Windows opens the Gitbash installed when you install git),

1, execute the following command:
git config--global user.name "Your name or nickname" git config--global user.email "your Mailbox"
Add your information,
2, and then use the command:

git Add.

(Don't forget a space after a point) Add the project file in the file to the GIT cache
3, and then use the command:
Git commit-m "casual label Info"
Complete the processing of things add the files in the cache to the warehouse
4, and then use the command:

Git remote add Origin https://git.oschina.net/###/###/
   Upload your files to git on the project, and of course first you have to have git account # representing your account name and project name 
   5, and finally submit the command:
   ' Git push Origin master '
    where origin is the default warehouse name 
   6, note: If the previously existing project is updated, first pull the project, first use the command:
   ' git pull--rebase Origin master ' to resubmit the 
    project.

4, how to generate the SSH public key
1, you can generate Sshkey according to the following command:

Ssh-keygen-t rsa-c "Xxxxx@xxxxx.com"  

XX means your email address.
Generating public/private RSA key pair ...
Three times enter to generate SSH key
View your public key and add it to Git @ OSC SSH key add address

Cat ~/.ssh/id_rsa.pub

Ssh-rsa aaaab3nzac1yc2eaaaadaqabaaabaqc6entgpngwstc .....
After adding, enter in the terminal (Terminal)

Ssh-t git@git.oschina.net

If you return

Welcome to Git@osc, yourname!

proves that the addition is successful. You may also want to enter a user name and password
2. How to add user ssh key?

Click on the top right corner of the logo to enter the personal center, and then click on the left of the SSH public key in the following map to fill out your SSH public key
Click OK, and then verify the password (that is, your registered account password) to complete the SSH public key add
3. What is the difference between the SSH key for the project and the user's SSH key two?
The Sshkey of the project is for the project only, and we provide only the deployment public key to the project, that is, the public key under the project can only pull the project, which is typically used by the production server to pull the warehouse code.
And the user's key is for the user, the user added key to the user under the name of the project and the user participated in the project has permissions, in general, the user's key has the push and pull permissions, and the project key only has the pull permission.

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.