[Java] Java Core 85: Git Tutorial (8) Introduction to GIT Remote Warehouse and Registration and Creation of Code Cloud Warehouse



insert image description here


Git is a distributed version control system that allows multiple developers to work together and manage versions of code. A remote warehouse is a Git warehouse stored on the network, which can be used for code sharing and collaboration among team members.

Common remote warehouse hosting service providers include GitHub, GitLab, and Bitbucket. Among them, Gitee is a leading code hosting platform in China, similar to GitHub, which provides online Git warehouse hosting services.

To register and create a warehouse on Code Cloud, follow these steps:

Click the "Register" button in the upper right corner of the page, fill in the registration information and complete the registration process.
After successful registration, log in to your Code Cloud account.
Click the "New Warehouse" button (usually located in the upper right corner of the page) on the home page or warehouse page.
Enter the warehouse name, description and other relevant information on the creation page, and select the permission setting of the public or private warehouse.
After the creation is complete, you will get a URL address of the remote warehouse, which can be used to clone (clone) the warehouse to the local or perform other operations with the remote warehouse.
When using Git, you can associate the local warehouse with the remote warehouse through the following command:

Clone the remote warehouse to the local:

git clone <远程仓库URL>

Associate an existing local repository with a remote repository:

git remote add origin <远程仓库URL>

Once the local warehouse is associated with the remote warehouse, you can use Git commands to perform operations such as branch switching, merging, and deletion. For example:

Create a new branch and switch to it:

git branch <分支名称>
git checkout <分支名称>

Switch to an existing branch:

git checkout <分支名称>

Merge branch:

git merge <被合并的分支名称>

Delete branch:

git branch -d <要删除的分支名称>

Please note that when performing operations involving remote warehouses, you may need to pull (pull) remote updates or push (push) local commits to remote warehouses for synchronization.


13.GIT remote warehouse introduction and code cloud warehouse registration creation

Target
能说出常用的GIT远程仓库,并完成码云仓库的注册创建

##### content

The local warehouse is actually stored on the personal computer, and is used to store personal submission records and submission logs. To put it simply, the contents of your commit submission are all locally

A remote warehouse is a warehouse on the public network or an extranet. It is mainly used to store individual or team submission records and submission logs. Team development is also achieved by remote warehouses. It is OK for everyone to submit things to the same remote warehouse, so that everyone can get all the content developed in the team. Currently, there are three


commonly used remote warehouses supported by git on the market:

insert image description here

GitHub is a hosting platform for open source and private software projects. To put it bluntly, it provides developers with a remote warehouse. Of course, the functions provided by others are still very powerful. In 2018, Microsoft acquired GitHub for US$7.5 billion. In addition to carrying the function of a code hosting platform, the current GitHub has a greater function of setting up a same-sex communication platform. A large number of code farmers do technical and non-technical exchanges on it. There are still many active users. Unfortunately, this master station is abroad. , the speed is average.

Gitee and GitHub are the same thing. It is a Git-based code hosting platform launched by Open Source China (OSChina), also known as Code Cloud . What are the characteristics? Yes, it is still very hard, the main station is in China, do you understand it in seconds? The speed is fast, the number of Chinese code farmers is not ordinary.

Both GitHub and gitee are open source code hosting platforms, and there is a bug here. What if the project I am working on is very confidential? Put it on the public Internet? It's unrealistic. I don't dare to let you provide high-level security services. If you set it up yourself, gitlab will have it. Based on git as a version control tool, gitlab can build a web server for you, and you can understand that you have built a server that can be accessed in the local area network. What's the use? Private server, the code is safe, and no one else can access it, so this is the only way to use it.

So which one do we play if we play remote warehouse? 100% play gitee, it's fast and free, how great.

insert image description here

Please complete the registration and login independently

  • Create warehouse

insert image description here

Fill in the information related to the project

insert image description here

insert image description here

After the warehouse is created, you can see that if we want to synchronize with the remote warehouse, multiple communication protocols are supported here. When we select a protocol, the corresponding remote warehouse address will appear later .

insert image description here

summary
  • What are the remote warehouses commonly used by git

    github gitee gitlab




insert image description here

Guess you like

Origin blog.csdn.net/m0_60915009/article/details/131457615
Recommended