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


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