---
# System prepended metadata

title: git建branch & push branch
tags: [git, github]

---

# git建branch & push branch
###### tags: `git` `github`

==以下示範branch名稱為jin==

* **第一步的git clone 指令**

![](https://i.imgur.com/7XmfLBw.png)
**還不會的可以參考我的另一篇文章：** [學會使用Git與GitHub](https://hackmd.io/@KikiJin24/tutorial_github)

---

* **建立branch**
git branch jin

* **switch to branch**
git checkout jin

![](https://i.imgur.com/CduiK6t.png)



* **push branch**
git push origin jin

![](https://i.imgur.com/GDT5d8i.png)



* **補充: 相當於建立branch + checkout到branch的指令**
git checkout -b jin


* **補充：**
    cd的意思是change direction(切換路徑)，可以用切換到你想去的資料夾，寫法是用相對路徑




