freeCodeCamp/guide/russian/miscellaneous/cloning-all-remote-branches.../index.md

30 lines
1.0 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: Cloning All Remote Branches in Git
localeTitle: Клонирование всех удаленных филиалов в Git
---
Чтобы клонировать удаленный репозиторий git, введите в терминал следующее:
> Примечание. Убедитесь, что вы находитесь в корневой папке, например `webdev` а не в конкретной папке проекта.
```
git clone <remote_repo>
cd <remote_repo>
```
Перечислите свои ветви, используя следующие команды:
```
git branch // Lists local branches
git branch -a // Lists local and remote branches
```
Чтобы проверить локальную удаленную ветвь:
```
git checkout <branch>
```
Ниже приведен пример получения удаленной ветви `master` из FreeCodeCamp:
```
git clone https://github.com/FreeCodeCamp/FreeCodeCamp.git
cd FreeCodeCamp
git checkout master
```