Skip to content

Commit

Permalink
修改
Browse files Browse the repository at this point in the history
  • Loading branch information
arkingc committed Aug 14, 2018
1 parent b3d4f37 commit ac069a0
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions Linux/git.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
> 内容源自[廖雪峰的Git教程](https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000)
* [一.git配置](一git配置)
- [1.配置git用户名和邮箱](1配置git用户名和邮箱)
* [二.仓库](二仓库)
- [1.创建git仓库](1创建git仓库)
- [2.查看仓库状态](2查看仓库状态)
- [3.远程仓库](3远程仓库)
* [一.git配置](#一git配置)
- [1.配置git用户名和邮箱](#1配置git用户名和邮箱)
* [二.仓库](#二仓库)
- [1.创建git仓库](#1创建git仓库)
- [2.查看仓库状态](#2查看仓库状态)
- [3.远程仓库](#3远程仓库)
- [4.协同工作](#4协同工作)

<br>
<br>
Expand Down Expand Up @@ -104,4 +105,24 @@ git status

* `master`:主分支,要时刻与远程同步
* `dev`:开发分支,团队所有成员都需要在上面工作,所有也需要与远程同步
* `bug`:只用于在本地修复bug,就没必要推送到远程了,除非老板要看看你每周修复了几个bug
* `bug`:只用于在本地修复bug,就没必要推送到远程了,除非老板要看看你每周修复了几个bug

### 4.协同工作

拉取分支:

```bash
git pull
```

`git clone`时,默认情况下只能看到本地的`master`分支。如果要在`dev`分支上开发,就必须创建远程`origin``dev`分支到本地,可以使用如下命令创建本地`dev`分支:

```bash
git checkout -b dev
```

将本地`dev`分支与远程`origin/dev`分支关联起来:

```bash
git branch --set-upstream dev origin/dev
```

0 comments on commit ac069a0

Please sign in to comment.