git stuff

git stuff


trick

git bash 沒法標記複製解決辦法
git bash窗口左上角圖標點擊,選擇屬性->選項->快速編輯模式 肯定就ok了git

Usual Commands

建立分支
git branch branch-name
git push origin branch-namebash

刪除分支
git branch -r -d origin/branch-name
刪除遠程分支
git push origin :branch-name
分支切換
git checkout branch-name
查看提交歷史
git log
默認不用任何參數的話,git log會按提交時間列出全部的更新,最近的更新排在最上面code

git log --pretty=oneline 除了oneline還有short full fuller format能夠用
例如format 也就是格式化的log
git log --pretty=format:"%h - %an, %ar : %s"
onelineformat 時結合 --graph 選項,能夠看到開頭多出一些 ASCII 字符串表示的簡單圖形,形象地展現了每一個提交所在的分支及其分化衍合狀況orm

相關文章
相關標籤/搜索