git配置
Git安裝完成之後,需要進行一些基本信息設置
-
設置用戶名
git config --global user.name ‘xxxt’ -
設置用戶名郵箱
git config --global user.email 'ixxx@‘xxxt.com’ -
查看設置
git config --list
修改後
4.修改配置文件,免用戶名密碼,權限等操作
vi .git/config
#將
[remote “origin”]
url = https://github.com/用戶名/倉庫名.git
修改爲:
[remote “origin”]
url = https://用戶名:密碼@github.com/用戶名/倉庫名.git
git從本地到遠程的提交流程
1.在工作區提交到暫存區
2.在暫存區提交到本地倉庫
3.從本地倉庫提交到遠程倉庫
對應代碼:
1.git add xxx.xxx
2.git commit -m ‘提交描述’’
3.git push
其他代碼:
git init//初始化git
git clone ‘下載地址’//下載到本地
git status //查看狀態
github相關概念
Repository//倉庫
用來存儲數據的地方
Star//收藏
可以收藏別人的項目,方便下次查看
Fork//克隆
把別人的項目克隆到自己的倉庫,克隆後在自己的項目上會看到它的作者。而且自己倉庫克隆後的項目是獨立的,它的修改,不會影響作者的項目。
Pull Request//發送請求
如果想要影響作者的項目,可以在本地修改後,Pull Request發送請求。
Watch//關注
關注別人的項目後,當項目更新可以接收到通知
Issue//事務卡片
可以通過issue和作者聯繫,提建議等。
著名公司的開源項目
阿里 https://github.com/alibaba
騰訊 https://github.com/AlloyTeam
百度 https://github.com/baidufe
Google:https://github.com/google
蘋果:https://github.com/apple
Facebook:https://github.com/facebook
Twitter:https://github.com/twitter
微軟:https://github.com/microsoft
Square:https://github.com/square