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

Git push met when he arrived at GitHub.

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

Share

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

1. Open git in the manage folder, type git init to initialize the local warehouse, and GitHub to create a remote warehouse manage

2. The following command is associated with local and remote repositories, * my user name

Git remote add origin git@github.com:**/manage.git

3. You already have the project code locally. After add and commit, you want to push to the remote warehouse.

Git push origin master

An error was reported at this time:

! [rejected] master-> master (non-fast forward)

.

.

After searching the Internet for a long time and entering all kinds of invalid and wrong commands, we finally found a solution:

1. Git pull origin master-- allow-unrelated-histories / / synchronizes the remote warehouse with the local one to eliminate differences

2. Re-add and commit the corresponding files

3 、 git push origin master

4. At this time, the upload will be successful.

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

Servers

Wechat

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

12
Report