Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the use of git and Code Cloud?

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces you how to use git and code cloud, the content is very detailed, interested friends can refer to, I hope it can be helpful to you.

Origin

I have said so many things about git and Ma Yun, but I have never explained to everyone what this code cloud is.

Today, I will tell you how to build your own code base through git and Code Cloud.

Code cloud

Git@OSC is a fast, free and stable online code hosting platform based on Git launched by the open source Chinese community team, which does not limit the number of private and public libraries.

Github you must have heard of it, Ma Yun is the Chinese version of github, if you are interested, you can learn about it together, after all, sometimes github gets into the wind and can't do anything. So the domestic environment is good, China's github is still very suitable for most people, although there is not much content, but compared with github's foreign servers, the speed of Ma Yun in China is leveraged, and, most importantly, private projects are free of charge! Private projects are free! Private projects are free!

Official website address: https://git.oschina.net/

Step one, register.

Part II, login

Check your mailbox before logging in.

Create a project

The first thing that comes into view is to create a project and improve the data. if you don't like your avatar or other information, you can improve the information first. let's create our first project, ha.

Click to create a project

Give the project a name, test.

For language, select PHP first and add .gitignore file. Open source license can be selected by referring to the figure below.

We chose the Apache license

You can make your project private and free. That's great.

Initialize the project with README, which allows you to write documents similar to what users should know

Git management

Before you start the git clone project, you need to set up a keygen that can clone the code in your code cloud.

When we finish creating the project, we will go to this page

See the management in the upper right corner, click it

Click add Public key, and if you want your project to be able to write, click the yellow one to add a personal public key.

How to generate public key # ssh-keygen-t rsa-C "xxxxx@xxxxx.com"

All the way down Enter, ha ~ just don't type in the content ~ don't ask why, because you will be cheated ~

# cat ~ / .ssh/id_rsa.pub

Copy the printed content of the screen to the personal public key just now, which is the red part of the picture below.

Click OK, add finished, and then go to your local place to clone your project.

Clone project

Go back to the home page of the project and see the one in the upper right corner. Click on it, pop up a box, and select ssh mode clone code.

Copy this line of code, go to your local, find a folder, and start clone.

# cd ~ / gitosproject#git clone git@git.oschina.net:ifengye/test.git

See this line, indicating that the code of the remote warehouse has been brought down by clone!

# cd test

Let's start playing with the code, bang, OK, done, let's submit our code, ha ~

Submit a project

A good habit, no matter how many people participate in this project, pull before push to see if there is any merge code, there is merge to solve merge, if not, go directly to the following command

# git pull origin master#git add. # git commit-m 'init'#git push origin master

OK, let's go and see if the code has been added.

About how the use of git and code cloud is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report