// Tutorial //

Como instalar o Git no Ubuntu 18.04 [Início rápido]

Published on November 7, 2019
Português
Como instalar o Git no Ubuntu 18.04 [Início rápido]

Introdução

Os sistemas de controle de versão ajudam a compartilhar e colaborar em projetos de desenvolvimento de software. O Git é um dos sistemas de controle de versão mais populares disponíveis atualmente.

Este tutorial irá mostrar como instalar e configurar o Git em um servidor Ubuntu 18.04. Para uma versão mais detalhada deste tutorial, contendo explicações mais completas para cada etapa, consulte Como instalar o Git no Ubuntu 18.04.

Passo 1 — Como atualizar os pacotes padrão

Estando logado no servidor Ubuntu 18.04, como um usuário sudo não-root, atualize primeiro seus pacotes padrão.

  1. sudo apt update

Passo 2 — Instale o Git

  1. sudo apt install git

Passo 3 — Como confirmar a instalação bem sucedida

É possível confirmar que sua instalação está funcionando corretamente ao executar este comando e receber a saída similar ao seguinte:

  1. git --version
Output
git version 2.17.1

Passo 4 — Como configurar o Git

Agora que você tem o Git instalado, para prevenir avisos, você deve configurá-lo com as suas informações.

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

Se for necessário editar este arquivo, será possível usar um editor de texto como o nano:

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

Tutoriais relacionados

Alguns links para tutoriais mais detalhados relacionados a este guia:

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

Learn more about us


Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in our Questions & Answers section, find tutorials and tools that will help you grow as a developer and scale your project or business, and subscribe to topics of interest.

Sign up now
About the authors

Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?
 
Leave a comment
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 here to sign up and get $200 of credit to try our products over 60 days!
Try DigitalOcean for free