Services Spotlight:

Install the Latest Version of Git on Ubuntu

Written By Corlew Solutions
Updated May 2, 2016
Published February 15, 2016
Why Corlew Solutions?

We write great software and provide amazing technical support. Contact us today if you need help with a software project:

  • Website: Send an inquiry
  • Email:
  • Phone: (703) 688-3058

Article Technology Info

This article discusses the following technologies:

  • Git - A free and open source distributed version control system
    (website | download | docs)
  • Ubuntu - A Debian-based Linux operating system that is a popular server choice.
    (website | download | wiki)

If you found this article, we don’t need to sell you on the merits of Git. So let’s get right to it.

Install the Latest Version of Git

The default repositories, for the Ubuntu package manager, typically don’t have the latest version of Git. To get the very latest stable version, we just need to add an additional repository that is updated when new versions are released:

1
2
sudo add-apt-repository ppa:git-core/ppa # Add the main repository
sudo apt-get update

Now install Git:

1
sudo apt-get install git

Verify Git is installed:

1
git --version

Configure Git

Here is a list of settings you’ll typically want to configure immediately after installing Git.

1
2
3
4
git config --global user.name "put your name here"
git config --global user.email "put your email here"
git config --global color.ui true
git config --global push.default simple

Some Git commands open an editor and ask you to edit a file. There are many editor options available. Here’s how you would configure git to use nano.

1
2
sudo apt-get install nano
git config --global core.editor "nano"

Add Some Aliases

After working with Git for a while, you may start looking for ways to work more efficiently. Git Aliases are a great way to streamline your workflow. Check out our best-git-aliases GitHub project for a list of our favorite aliases; here are a couple to get you started.

1
2
3
git config --global alias.logg 'log --graph --decorate --oneline --abbrev-commit'
git config --global alias.state '!git fetch origin && git remote show origin && :'
git config --global alias.sync '!git fetch origin && git remote prune origin && :'

We hope you found this article useful. If you see any mistakes, missing features or ways to improve it, please let us know in the comments below so we can update its contents. If you're willing to link to us, we would sincerely appreciate it!

Corlew Solutions is a Web Design and Web Application Development company based in Fairfax Virginia, minutes away Washington D.C. If you're looking for great web design from the Northern Virginia area or web design from the Washington D.C. area we can help. Contact Us today!

comments powered by Disqus