MyTetra Share
Делитесь знаниями!
branches
Время создания: 19.04.2017 18:13
Раздел: git - theory
Запись: xintrea/mytetra_db_mcold/master/base/1492614726j8bfazhc54/text.html на raw.githubusercontent.com

## 3. Branches


### Создание ветки branch

```git

git branch prs/pr-1138

```


### Создание ветки с переходом в нее

```git

git checkout -b hotfix

```


### Создание ветки от другой ветки (при отсутствии это master)

```git

git checkout -b myfeature develop

```


### Отображение списка branch

```git

git branch

```

command lists branch names found in the repository


### Информация по веткам

```git

git show-branch

```

command provides more detailed output than git branch , listing

the commits that contribute to one or more branches in roughly reverse chronological

order


If you wanted to see the commit history for just the bug/pr-1 and bug/pr-2 branches,

you could use

```git

$ git show-branch bug/pr-1 bug/pr-2

```

### Переключение на ветку

```git

git checkout bug/pr-1

```


### Одновременное создание и переключение на ветку

```git

git checkout -b new-branch start-point

```


### Просмотр содержимого файла по ветке

```git

git show bug/pr-1:NewStuff

```

### Удаление ветки

```git

git branch -d hotfix

```


 
MyTetra Share v.0.59
Яндекс индекс цитирования