使用github 托管代碼簡單使用教程--開源開發-常見錯誤
- 5. github開源開發
- 6. 報錯log
- 6.1 fatal: remote origin already exists.
- 6.2 There is no tracking information for the current branch.
- 6.標簽管理
廖雪峰老師博文學習筆記:https://www.liaoxuefeng.com/wiki/896043488029600/897884457270432
5. github開源開發
step1: Fork 開源項目至自己的github平臺端
step2: 從自己的github 平臺clone該倉庫到本地
step3: 在本地進行開發,將文件push到自己的遠端倉庫
step4: 向開源項目發起pull reques,對方視情況答應你的合并代碼要求
6. 報錯log
6.1 fatal: remote origin already exists.
命令:
git remote add origin git@github.com:cyy-hub/Deecamp.git
報錯:
fatal: remote origin already exists.
分析:已經關聯了一個倉庫
解決:刪除原來的關聯,在添加新的關聯
git remote rm origin
git remote add origin git@github.com:cyy-hub/Deecamp.git
6.2 There is no tracking information for the current branch.
問題描述:
$ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/ dev
原因:本地分支沒有和遠程分支建立聯系
解決:建立聯系
$ git branch --set-upstream-to=origin/dev dev
Branch ‘dev’ set up to track remote branch ‘dev’ from ‘origin’.
6.標簽管理
暫時沒get到有什么用,就不記了
廖雪峰老師博文學習筆記:https://www.liaoxuefeng.com/wiki/896043488029600/897884457270432