freeCodeCamp/guide/russian/miscellaneous/checkout-a-remote-branch-in.../index.md

38 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
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` .