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

How to push the code to Ciyun

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly introduces "how to push the code to the code cloud". In the daily operation, I believe that many people have doubts about how to push the code to the code cloud. The editor has consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the question of "how to push the code to the code cloud"! Next, please follow the editor to study!

1 git configuration

Git config-global user.name "user name"

Git config-global user.email "mailbox"

2 generate public key and private key

# ssh-keygen-t rsa-C "xxxxx@xxxxx.com"

Enter all the way down, and fill the generated public key on the password cloud.

# cat ~ / .ssh/id_rsa.pub

3 establish git warehouse

Execute the git command under your project folder

Git init

4 add the project file to the warehouse

Git add.

5 commit the add files to the warehouse

Git commit-m 'remarks'

6 associate the local warehouse to the cloud

Git remote add origin git@gitee.com:shiqingqing/test.git

7 pull before uploading the code to the cloud

Git pull origin master

8 the last step is to upload the code to the cloud warehouse

Git push-u origin master

After execution, go to Guyun to see the code of your project.

If an error occurs, hint: Updates were rejected because the tip of your current branch is behind

Hint: its remote counterpart. Integrate the remote changes (e.g.

Hint: 'git pull...') Before pushing again.

Hint: See the 'Note about fast-forwards' in' git push-- help' for details.

You can continue with this operation. The git push-u origin master-f mandatory command will overwrite other branches, so use it with caution.

At this point, the study on "how to push the code to the code cloud" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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