Tutorial

Установка Git в Ubuntu 18.04 [Краткое руководство]

Published on November 7, 2019
Русский
Установка Git в Ubuntu 18.04 [Краткое руководство]

Введение

Системы контроля версий помогают осуществлять обмен данными и сотрудничать в рамках проектов разработки программного обеспечения. Git — одна из наиболее популярных систем управления версиями из доступных сегодня.

Это руководство поможет выполнить установку и настройку Git на сервере Ubuntu 18.04. Более детальный вариант настоящего руководства с подробным разъяснениями каждого шага см. в статье «Установка Git в Ubuntu 18.04».

Шаг 1 — Обновление пакетов по умолчанию

Выполните вход на ваш сервер Ubuntu 18.04 в качестве пользователя sudo без прав root, сразу же обновив используемые по умолчанию пакеты.

  1. sudo apt update

Шаг 2 — Установка Git

  1. sudo apt install git

Шаг 3 — Проверка установки

Вы можете подтвердить, что установка Git выполнена корректно с помощью этой команды, получив в результате примерно следующий вывод:

  1. git --version
Output
git version 2.17.1

Шаг 4 — Настройка Git

Теперь, когда вы установили Git, для предотвращения получения предупреждений вам нужно выполнить настройку с использованием ваших данных.

  1. git config --global user.name "Your Name"
  2. git config --global user.email "youremail@domain.com"

Если вам нужно изменить этот файл, вы можете использовать текстовый редактор, например nano:

  1. nano ~/.gitconfig
~/.gitconfig contents
[user]
  name = Your Name
  email = youremail@domain.com

Другие обучающие руководства

Здесь представлены ссылки на более подробные обучающие руководства, связанные с настоящим руководством:

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about us


About the authors

Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?
 
Leave a comment


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Join the Tech Talk
Success! Thank you! Please check your email for further details.

Please complete your information!

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel