Системы контроля версий помогают осуществлять обмен данными и сотрудничать в рамках проектов разработки программного обеспечения. Git — одна из наиболее популярных систем управления версиями из доступных сегодня.
Это руководство поможет выполнить установку и настройку Git на сервере Ubuntu 18.04. Более детальный вариант настоящего руководства с подробным разъяснениями каждого шага см. в статье «Установка Git в Ubuntu 18.04».
Выполните вход на ваш сервер Ubuntu 18.04 в качестве пользователя sudo без прав root, сразу же обновив используемые по умолчанию пакеты.
- sudo apt update
- sudo apt install git
Вы можете подтвердить, что установка Git выполнена корректно с помощью этой команды, получив в результате примерно следующий вывод:
- git --version
Outputgit version 2.17.1
Теперь, когда вы установили Git, для предотвращения получения предупреждений вам нужно выполнить настройку с использованием ваших данных.
- git config --global user.name "Your Name"
- git config --global user.email "youremail@domain.com"
Если вам нужно изменить этот файл, вы можете использовать текстовый редактор, например nano:
- nano ~/.gitconfig
[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.
Community and Developer Education expert. Former Senior Manager, Community at DigitalOcean. Focused on topics including Ubuntu 22.04, Ubuntu 20.04, Python, Django, and more.
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!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.