git branch 檢視本地所有分支
git status 檢視當前狀態
git commit 提交
git branch -a 檢視所有的分支
git branch -r 檢視遠端所有分支
git commit -am 「init」 提交並且加注釋
git remote add origin git@192.168.1.119:ndshow
git push origin master 將檔案給推到伺服器上
git remote show origin 顯示遠端庫origin裡的資源
git push origin master:develop
git push origin master:hb-dev 將本地庫與伺服器上的庫進行關聯
git checkout –track origin/dev 切換到遠端dev分支
git branch -d master develop 刪除本地庫develop
git checkout -b dev 建立乙個新的本地分支dev
git merge origin/dev 將分支dev與當前分支進行合併
git checkout dev 切換到本地dev分支
git remote show 檢視遠端庫
git add .
git rm 檔名(包括路徑) 從git中刪除指定檔案
git clone git: 從伺服器上將**給拉下來
git config –list 看所有使用者
git ls-files 看已經被提交的
git rm [file name] 刪除乙個檔案
git commit -a 提交當前repos的所有的改變
git add [file name] 新增乙個檔案到git index
git commit -v 當你用-v引數的時候可以看commit的差異
git commit -m 「this is the message describing the commit」 新增commit資訊
git commit -a -a是代表add,把所有的change加到git index裡然後再commit
git commit -a -v 一般提交命令
git log 看你commit的日誌
git diff 檢視尚未暫存的更新
git rm a.a 移除檔案(從暫存區和工作區中刪除)
git rm –cached a.a 移除檔案(只從暫存區中刪除)
git commit -m 「remove」 移除檔案(從git中刪除)
git rm -f a.a 強行移除修改後檔案(從暫存區和工作區中刪除)
git diff –cached 或 $ git diff –staged 檢視尚未提交的更新
Git 常用命令速查
記錄一下方面自己查詢 git branch 檢視本地所有分支 git status 檢視當前狀態 git commit 提交 git branch a 檢視所有的分支 git branch r 檢視遠端所有分支 git commit am init 提交並且加注釋 git remote add or...
Git 常用命令速查
英文 含義master 預設開發分支 head 預設開發分支 origin 預設遠端版本庫 head head的父提交 注 此表引用自網際網路 2.修改和提交 3.檢視提交歷史 4.撤銷 5.分支與標籤 6.合併和衍合 7.遠端操作 1.1 轉殖遠端版本庫 git clone1.2 初始化本地版本庫...
Git 常用命令速查
git branch 檢視本地所有分支 git status 檢視當前狀態 git commit 提交 git branch a 檢視所有的分支 git branch r 檢視遠端所有分支 git commit am init 提交並且加注釋 git remote add origin git 19...