---
# System prepended metadata

title: Azure DevOps Repos
tags: [Azure DevOps]

---

---

title: Azure DevOps Repos # 簡報的名稱
tags: Azure DevOps   # 簡報的標籤

---

# Azure DevOps Repos

## Repos

### 1. New Repository

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

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

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

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

### 2. Clone Project

#### http (使用 azure帳號密碼 clone)

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

![](https://i.imgur.com/i83Vues.png)
 
#### SSH 

##### 1.create ssh key

```bash=
ssh-keygen -t rsa -b 4096 -f azuredevops
```
![](https://i.imgur.com/SUESSTl.png)

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

#### 2. copy azuredevops.pub

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

#### 3. Creat SSH public keys
![](https://i.imgur.com/TupuLG5.png)

#### 4. New Key
![](https://i.imgur.com/riYjNih.png)

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

#### 5. git clone

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

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

### 3. Pull Request

#### 1. Create branch

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

#### 2. branch name

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

#### 3. 設定規則 project settings

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

#### 4. Add branch protection

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

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

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


#### 5. 設定最少兩個人允許才可以合併分支（為了放便練習，先設定一個人）

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


#### 6. 修改檔案並且送交分支

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

#### 7. New pull request
![](https://i.imgur.com/fAdjrF4.png)

#### 8. 選擇 dev 分支
![](https://i.imgur.com/OIowv6p.png)


#### 9. Create
![](https://i.imgur.com/ZMs0qQu.png)

#### 10. Approve 批准 & Complete 完成

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

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



# 參考

* [azure.microsoft.com](https://azure.microsoft.com/zh-tw/services/devops/)
* [Set up your client's npmrc](https://docs.microsoft.com/zh-tw/azure/devops/artifacts/npm/npmrc?view=azure-devops&tabs=windows)