---
# System prepended metadata

title: Git Alias 安裝
tags: [git]

---

# Git Alias 安裝

## 介紹
git alias 是一個很方便的東西、抓別人的 git alias 更方便，所以...
https://github.com/GitAlias/gitalias#what-is-git-alias

## 下載
連結點[這](https://raw.githubusercontent.com/GitAlias/gitalias/master/gitalias.txt)，把它下載到 cygwin user 的家目錄底下
## 安裝
為了安裝一遍之後，所有的 repo 都可以用、因此我們要安裝在 git 的 global setting 裡面
以 Mac 的 terminal 為例：.gitconfig 在 unix/linux 系統底下都是放在 user folder 裡面
![](https://lh3.googleusercontent.com/XTODlZIqpf3fDROzWPAsLRxOxClRkgYlqOaOfHM9vK-fEh4wbuvIasJEeWm6yFb25nvp_7OLjvpjGtwY36mCqFJa8DC0s4xDAUtqo_yIjEaYni7m0CeazPfK2_PQR9wvG-4XPBN-WzC0HMGqadNhCZCqQVUKc9DdQr8pDqh_RM5iZmzFjAS8Mb8buhvN1qGRavKWnCBMebObgji2FIeHr1nQmErhOL_v87L_oLniMMapw6BwduHLZsdZTNH9iVBZkHAPvY2u6RGlhiC8SZJ-lv6LfJVLaf91aGfYNLSwDsaIvh-XDz1gG6WO0oTvdLF1PuXi5s3pWmZ3TsPLaTNP24zp-Xt0WSMu-xShxABt-QzxXqlxTGIDkTX5ZSylPT_qZmDRj1Y6XTrZLTiNHihi28EOZ4vTYidBBSwLabLiEObRgC207zvL34FySPLwgArsMJG7k1N3y0jTf-VNMSnFCT8O1MUdxfiOpJ05kANc573l4OBIxImnh5WOTilt8EdToUlOT_G8KsJQOPN9EEXyeMad4q-_y2pUTvsXHVrw1JbaxTp93TU11Cf1g4gDnAJcsHenrtFzEaJbF5mj7HWoCVVm1wVJJTs8awIL7pCnwqG9bKbSGSKboSCWHyNqgV_4waeZWcTLjGl96v-lWHaReSv1ym9dLqAI_lwAQI3l5u-mB6mvIMnOw83tLUpeNcJaLbhehJQr8eon5fpXN7I=w889-h137-no)

因此把剛剛下載的檔案放到 user folder 之後、增加指令 .gitconfig 如下圖 (把 cchsu20 改成你自己的 user name)
![](https://lh3.googleusercontent.com/gPsUjj1uM4JzATQ3Cu5VxssCTB95mD5kwY2Nw50IrYiKZxz2LsSF8XhkrHxw1IE2h6fY02ajwggbxrNLu0Oje7sefZRFv4VcFoLmD4Diods7lA218d4K2wi8SBhdHMsgnJQ2qWgjiIhyP5NRp_OXFOjqF1yO6oZA14ljklOUmcrreTH-PY234zrzVi6oQZwNng7BG9TseepbiyiBrllZZmKgdVUqx1x_kaDUwrIs3zePOf6OEHwYFF6oC-YD3pEYhjs98jsQ2n_gxyj40N6jPMxXYcirJwVmoAgZ5gW-tEmLZiaOLfyB7IttV_O9AEMlq3NwJ7vRDYHTrCiNsuxdWSlp_AWSJkqHyN48g2y67Yhbe9M6wbGMiE0MfPwygHr-9BMQ7VxBUyc3I0eH7s821zifYEGHhQ3_iSPdXpvtk1ljGYgaIhPXHtJnJnBjD-fQvamMyn57w7fRvzMeJeYeZtXHrT8ZcRyZ0E746wJ5c2xsYJAjMiQXOfO_U3JBk7577PvCobAyW_LkwgK_42GG45eOvBJzh3UJkKnk1ITghDzORNv60VzT0XT0P1G31Rz2IpeMuco7IfdvK9dskQQQvOkYwhhC_vIWQyTCF-qU6_v_xCuIFGVhrA-NjxPU2jr_cy4lSQFNEhiJnxrh3LpT49kestsGXxv4XBw6CxsuTM83-dJi5Ic-M-7Wi7Iqosllv7o2IqoSfzUMictCces=w876-h231-no)

然後重開 terminal 之後，隨便進入一個有 git 的資料夾，輸入 git ss 或是 git s 就可以看到成果了
![](https://lh3.googleusercontent.com/P8kqDTWWm8-mFcDv9OIQWVrdYpycG5QgZ-NFxESIU2iFjNdGj8bDDvoAMuU5jBcjqJQ3lA_eppL0nA_rH5cFTGoyXBo8dO6JzlYd6ncmX8WH4SI126CM6S6SaoPjiqd7-AL7QXnchcGibScXQ1sr14PWB1CdrFJAeoZUw-VjwHQnDLUfBBCJ0EJsfFQc8oCUxWUXXX4sz7KYq75k3bxBi61N1zoAlNWWPfgolDuitvnKm8QcdcwgFdtrghqQjyoH8OiiAv06uNknRP-Ejzd_vrMwN8IW0PldLjBYKmJycXnD27Okspt4sAIXXhNpp_OPkaZqE8k8rcxx4ON1T6BzHjbKX66T9f5r4xxB-UZDQH4c9cxBpn69zFpV7g4V09Rqq23QP5cUEYBw15GsemtSUJd4AjH3PT3Gozdcfn8f-0qChYtK9a4DiumZC3A2BaS4wJQOKdhnS4f9vFrVrlRzrcoaoa__F3XJD7GiqAKHFlPAcUgPKxqrr1NoH9-8odgGZ6rhctOCYgDYHS0ic5yfb2FVqndMC5m2d8aTZ28vvzit9NYvYCvVCeOl-K-pS6SokZCVbP--nz_VtxwhVHx4M-H_m0bRfDDwa61IRXDn_hkPfyv1EnvYpVyLhe1Nqi6rch8NS1UZ8-I37M1qnaesEgOw-TnlyJfFeyQ7nO8uMChxbBHa5kg1MwqGEVJrL7Yc92etxQM53hlw9umZYp4=w763-h125-no)

詳細的 command 列表都在檔案裡，我常用的是

1. git a = git add
2. git c = git commit
3. git ss = git status --short
4. git ca = git commit --amend
5. git co = git checkout

###### tags: `git`