git config --global git配置
例如: git config --global user.name "xiaochuan" //設置名稱爲 xiaochuan
git init 初始化
git clone 克隆分支
例如: git clone https://github.com/liangguangchuan/gobbs
git pull 倉庫拉取
git push 倉庫推送
git diff 對比
例如: git diff index.php
git rm 刪除文件
例如: git rm index.php
git add 添加文件
例如: git add index.php
git stash 暫存
git stash apply 還原暫存
git branch 查看現有分支
git branch -D 刪除分支
例如: git branch -D test
git checkout 切換分支
例如: git checkout test
git merge 合併分支
例如: git merge local
git log 查看日誌
git remote -v 查看克隆地址
git add 參數解釋
git add -A 提交所有變化
git add -u 提交被修改(modified)和被刪除(deleted)文件,不包括新文件(new)
git add . 提交新文件(new)和被修改(modified)文件,不包括被刪除(deleted)文件
git 常用命令
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.