OOZOU
與我們聯繫
返回 TIL 列表
shell

建立你自己的 git 指令(alias)

October 13, 2020

有沒有想過縮短 git 指令?你當然可以用 shell alias,但你得一直記著前後脈絡,才不會忘記每個 alias 代表什麼。其實你可以用 alias 在 git 裡定義自己的指令。

git config --global alias.<handle> <command> 

舉個例子;我懶得打 git status,所以想把它縮短成 git s

git config --global alias.s status

就這樣,現在你只要輸入 git s 就能取得目前 repository 的狀態。

更多關於 shell 的筆記

shellDecember 8, 2020

在 Bash 和 Zsh 執行無痕/私密指令

只要在指令前面加一個空格,它就不會被存進 ~/.bash\_history。例如 qrencode -o out.png "Some secret text"

shellOctober 22, 2020

用 homebrew 升級 postgres 資料庫

要升級 postgres,可以執行

shellOctober 13, 2020

用 Amazon AWS S3 CLI 複製檔案並設定權限

打開 term(或同類終端機)並貼上以下內容:

有專案構想嗎?

我們很樂意聆聽您正在打造的產品。

開始對話hello@oozou.com
OOZOU Logo

曼谷 · 新加坡 · 香港

X
Facebook
Instagram
LinkedIn

服務

  • Web 開發
  • AI 代理人與生成式 AI
  • 行動應用開發
  • 數據分析與工程
  • UI/UX 與產品設計
  • 數位轉型

公司

  • 關於我們
  • 職涯
  • 部落格
  • 案例研究
  • Today I Learned
  • 聯繫我們

更多

  • 產業
  • 合作夥伴網絡
© 2026 OOZOU. 版權所有。
隱私政策行為準則反賄賂反貪腐政策