原則:瞭解每一條命令的作用並積累一些實際的操作經驗
實戰中使用過的命令詳解
1.git push origin
https://www.cnblogs.com/zl1991/p/7800108.html
git push origin
將當前分支推送到origin主機的對應分支(對應分支之前已經指定)
2.git push -u origin master
git push -u origin master
將本地的master分支推送到origin主機的master分支。如果master不存在,則會被新建。
同時指定origin爲默認主機
3.git push 命令的含義與格式
https://www.yiibai.com/git/git_push.html
4.Git 裏面的 origin 到底代表啥意思?
origin指向的就是你本地的代碼庫託管在Github上的版本。(本地代碼庫對應的遠程代碼庫)
https://www.zhihu.com/question/27712995/answer/39946123
5.git remote的用法
https://blog.csdn.net/north1989/article/details/53314345
本地創建的代碼與遠程倉庫建立連接:
git remote add origin https://gitee.com/potatobeancox/spring-boot-study.git
上面這個git操作解釋
git remote
爲了便於管理,Git要求每個遠程主機都必須指定一個主機名。git remote命令就用於管理主機名
git remote add
git remote add [shortname] [url]
添加遠程倉庫
git remote add origin https://gitee.com/potatobeancox/spring-boot-study.git
添加遠程倉庫,並將給定的url 命名爲origin,也就是爲origin 建立一個遠程的git連接
下面這個連接對上面這個命令解釋和詳細
https://blog.csdn.net/north1989/article/details/53314345
https://blog.csdn.net/zy00000000001/article/details/70505150