網站首頁 編程語言 正文
github上傳代碼error: src refspec master does not match any error: failed to push some refs to ‘https://g
作者:jack@london 更新時間: 2022-04-11 編程語言github上傳代碼至某空倉repository,有時候遇到報錯。
完整的過程為:
echo "# psaData" >> README.md
git init
git add README.md
git config --global user.email "you@example.com" (可以去掉--global)
git config --global user.name "Your Name"?(可以去掉--global)
git commit -m "first commit for your repo"
git status
git remote add origin https://github.com/{youre_account}/{youre_repo}.git
git push -u origin master
【注意】現在可能已經改為main,而不是master
下一次提交之前,一定要先同步本地與repository代碼。
git pull origin master
如果要提交代碼的repository不是空倉,則首先git clone將其下載下來。
隨后從git add 本地文件 開始,config視情況而定。
git下載代碼后,可以通過git status或git branch查看當前所在分支
可以通過git branch -a查看代碼所有分支
通過git checkout -b other?origin/other切換到其它分支
另外,如需rename repository的名字,可以到repository的Settings?tab中。
原文鏈接:https://blog.csdn.net/figosoar/article/details/108635030
相關推薦
- 2022-02-01 for循環中嵌套異步請求導致順序錯亂
- 2022-06-14 ASP.NET?Core?MVC中的局部視圖用法_基礎應用
- 2022-08-17 yolov5中anchors設置實例詳解_python
- 2021-12-12 Oracle數據庫的備份與恢復案例詳解_oracle
- 2022-07-12 windows系統-串口設備導致鼠標亂跳的問題
- 2022-02-17 MacOS Catalina啟用三指拖移
- 2022-05-11 深入理解AQS之獨占鎖ReentrantLock源碼分析
- 2022-01-31 為什么要使用3×3卷積?& 1*1卷積的作用是什么?& 對ResNet結構的一些理解
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支