標籤:工作 -- remote status 兩條命令 com init repos 添加
https://github.com/
1.在Windows上安裝Git
2.你的名字和Email地址
1.giithup刪除遠程庫
2.giithup遠程庫關聯本地
3.giithup建立與合并分支
3.本地版本庫
- git init命令把這個目錄變成Git可以管理的倉庫
- F:\MyRepository
- 工作區,暫存區
4.op
op1添加+提交
- git status
- git add readme.txt
- git commit -m "wrote a readme file"
- git push -f origin master
查看:
http://htmlpreview.github.io/?
https://github.com/lanczh/works/blob/master/web/index.html
op2運行git status命令看看結果
遠程倉庫
我們根據GitHub的提示,在本地的learngit倉庫下運行命令
1.方法一
https://github.com/lanczh/works.git
本地版本庫
媽媽再也不用擔心我的硬碟了
CodeReposition
F:\CodeReposition
ssh -T [email protected]
git clone https://github.com/lanczh/works.git
2.方法二
將本地的已有項目關聯到github上的新的項目上
F:\CodeReposition下執行
git remote add origin https://github.com/lanczh/works.git
我們建立dev分支,然後切換到dev分支
git checkout -b branch0822 //相當於以下兩條命令:git branch dev/ git checkout dev
然後,用git branch 命令查看當前分支:
- git branch
- git checkout master
- git merge dev
- git branch -d dev
git 衝突
- git status也可以告訴我們衝突的檔案
- Git用<<<<<<<,=======,>>>>>>>標記出不同分支的內容,我們修改如下後儲存:
- 用git log --graph命令可以看到分支合并圖
- git log --graph --pretty=oneline --abbrev-commit
https://github.com/lanczh/works/blob/master/pos/index.html
github上傳-遠程倉庫管理