Files
freeCodeCamp/guide/russian/miscellaneous/checkout-a-remote-branch-in-git/index.md
2018-10-16 21:32:40 +05:30

38 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Checkout a Remote Branch in Git
localeTitle: Оформить заказ удаленной ветви в Git
---
# Оформить рабочий процесс удаленной ветви
В зависимости от того, сколько пультов доступно для вашего местного репо, следуйте соответствующему потоку.
## Для репо с одним пультом:
Если ваше местное репо имеет только один пульт, например, только `origin` :
```
git remote -v
origin https://github.com/my_username/AwesomeRepo.git (fetch)
origin https://github.com/my_username/AwesomeRepo.git (push)
```
Тогда вы можете просто сделать:
`git fetch`
`git checkout some_branch_name`
## Для репозиций с несколькими пультами:
Если ваше местное репо имеет несколько пультов:
```
git remote -v
origin https://github.com/raisedadead/wiki.git (fetch)
origin https://github.com/raisedadead/wiki.git (push)
upstream https://github.com/FreeCodeCamp/wiki.git (fetch)
upstream https://github.com/FreeCodeCamp/wiki.git (push)
```
Затем вам необходимо указать удаленный:
`git fetch`
`git checkout -b some_branch_name <remote>/some_branch_name`
где `<remote>` в этом примере является либо `upstream` либо `origin` .