Git - 如何比對本機與遠端分支 diff local and remote branch

紀錄一下比對 local branch 及 remote branch 的語法 # 指令 git diff <local-branch> <remote>/<remote-branch> # 如果要看這次的修改 <commit> 會對遠端分支造成什麼變動,可以改變 branch 的位置 git diff <remote>/<remote-branch> <local-branch> # 更簡潔的版本 git diff origin git diff @{upstream}

Nginx 指令

Nginx 指令 紀錄一下 Nginx 幾個簡單常用指令 # 檢查 nginx 狀態 service nginx status --- # 啟動 nginx /etc/init.d/nginx start service nginx start systemctl start nginx # For mac OS X sudo nginx --- # 關閉 nginx /etc/init.d/nginx stop service nginx stop systemctl stop nginx # For mac OS X sudo nginx -s stop (快速

Git branch 重新命名

Git branch 重新命名 要重新命名 branch 非常的簡單。 # 重新命名現在的 branch git branch -m <new-branch-name> # 指定 branch 重新命名 git branch -m <old-branch-name> <new-branch-name> # 更新 local branch 至 remote git push origin -u <new-branch-name> # 刪除 remote 舊的 branch 方法 1. git push origin :<old-branch-name>

Hugo 常用指令

紀錄一下 Hugo 的一些常用指令 // 查看部落格的基本資訊 >> hugo // 查看網站設定資訊 >> hugo config // 建立新的文章 >> hugo new posts/<文章名稱>.md // 建