網(wǎng)站首頁 編程語言 正文
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
【注意】現(xiàn)在可能已經(jīng)改為main,而不是master
下一次提交之前,一定要先同步本地與repository代碼。
git pull origin master
如果要提交代碼的repository不是空倉,則首先git clone將其下載下來。
隨后從git add 本地文件 開始,config視情況而定。
git下載代碼后,可以通過git status或git branch查看當(dāng)前所在分支
可以通過git branch -a查看代碼所有分支
通過git checkout -b other?origin/other切換到其它分支
另外,如需rename repository的名字,可以到repository的Settings?tab中。
原文鏈接:https://blog.csdn.net/figosoar/article/details/108635030
相關(guān)推薦
- 2022-05-01 教你利用python如何讀取txt中的數(shù)據(jù)_python
- 2022-11-11 Python實現(xiàn)讀取文件夾按數(shù)字排序功能_python
- 2022-08-30 關(guān)于Flask高級_內(nèi)置信號的介紹和兩個小實例
- 2023-05-18 Python使用requirements.txt和pip打包批量安裝的實現(xiàn)_python
- 2023-06-04 Pandas通過index選擇并獲取行和列_python
- 2022-05-06 python 實現(xiàn)兩個excel表格數(shù)據(jù)的對比
- 2022-04-30 C#操作DataGridView設(shè)置單元格只讀_C#教程
- 2023-02-10 docker容器間互相訪問(docker?bridge網(wǎng)絡(luò))_docker
- 最近更新
-
- window11 系統(tǒng)安裝 yarn
- 超詳細win安裝深度學(xué)習(xí)環(huán)境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎(chǔ)操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區(qū)別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權(quán)
- redisson分布式鎖中waittime的設(shè)
- maven:解決release錯誤:Artif
- restTemplate使用總結(jié)
- Spring Security之安全異常處理
- MybatisPlus優(yōu)雅實現(xiàn)加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務(wù)發(fā)現(xiàn)-Nac
- Spring Security之基于HttpR
- Redis 底層數(shù)據(jù)結(jié)構(gòu)-簡單動態(tài)字符串(SD
- arthas操作spring被代理目標(biāo)對象命令
- Spring中的單例模式應(yīng)用詳解
- 聊聊消息隊列,發(fā)送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支