Code cloud upload project process

1. First create a project on the code cloud

 

2. In the project to be uploaded, right-click on Git Bash Here  to open it

 

3. Generate the public key of Git Enter :

ssh-keygen -t rsa -C "your email address"

 

The public key path is generated, find the path, open id_rsa with a text editor , Ctrl+A, and then copy the content and add it to the SSH public key of the code cloud

 

4. Initialize a project locally

First , you need to execute the following two commands, as the basic configuration of git, the role is to tell git who you are, and the information you enter will appear in the commits you create.

 

git config --global user.name "your name or nickname"

git config --global user.email "your email"  

 

Then execute in the folder where you need to initialize the repository

 

git init

git remote add origin "Your project address (the address of the project just created in the code cloud)"

 

This completes a version of your initialization

 

If you want to clone a project , just execute (because the local project is uploaded, all this step can be skipped)

 

git clone "project address"

 

5. Complete the first submission

Go to the directory where you have initialized or cloned the project , and execute

 

git pull origin master

git touch init.txt //If there are already changed files, this step is not necessary

git add .

git commit -m "first commit"

git push origin master

 

Then if you need an account password, enter the account password, and this completes a submission.

At this point, you can view your submission records on your personal panel and project home page

It has been completed here. If you encounter an exception during synchronization, please continue to look down.

 

sync conflict

When a new project is created according to this document, the readme file already exists in the code cloud platform warehouse , so there may be conflicts when submitting it. In this case, you need to choose to keep the online files or discard the online files;

 

(1) If you discard the files on the line, select forced push when pushing, and the following commands need to be executed for forced push

 

git push origin master -f

 

( 2) If you choose to keep the readme file online, you need to execute

 

git pull origin master

 

Then you can push , if there is a conflict, you need to resolve the conflict first, on how to deal with the conflict

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324929752&siteId=291194637