Git is an open-source revision control system, developed by Linus Torvalds, providing a big number of features and an intuitive syntax. It is used a lot by the developers that want to share their code with others.
The latest version available is Git 2.4.1, which has been recently released, coming with changes and fixes, including:
- The usual “git diff” when seeing a file turning into a directory showed a patchset to remove the file and create all files in the directory, but “git diff –no-index” simply refused to work. Also, when asked to compare a file and a directory, imitate POSIX “diff” and compare the file with the file with the same name in the directory, instead of refusing to run.
- The default $HOME/.gitconfig file created upon “git config –global” that edits it had incorrectly spelled user.name and user.email entries in it.
- “git commit –date=now” or anything that relies on approxidate lost the daylight-saving-time offset.
- “git cat-file bl $blob” failed to barf even though there is no object type that is “bl”.
- Teach the codepaths that read .gitignore and .gitattributes files that these files encoded in UTF-8 may have UTF-8 BOM marker at the beginning; this makes it in line with what we do for configuration files already.
- Access to objects in repositories that borrow from another one on a slow NFS server unnecessarily got more expensive due to recent code becoming more cautious in a naive way not to lose objects to pruning.
- We avoid setting core.worktree when the repository location is the “.git” directory directly at the top level of the working tree, but the code misdetected the case in which the working tree is at the root level of the filesystem (which arguably is a silly thing to do, but still valid).
Installation instructions:
The latest versions of Git are available via a LaunchPad PPA, permitting the users to automatically get the latest version on their system, if the PPA is enabled.
The below instructions should work on all the supported Ubuntu systems and derivatives: Ubuntu 15.04 Vivid Vervet, Ubuntu 14.10 Utopic Unicorn, Ubuntu 14.04 Trusty Tahr, Ubuntu 12.04 Precise Pangolin, Linux Mint 17.1 Rebecca, Linux Mint 13 Maya, Pinguy OS 14.04, Elementary OS 0.3 Freya, Elementary OS 0.2 Luna, Deepin 2014, Peppermint Five, LXLE 14.04, Linux Lite 2.
$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt-get update
$ sudo apt-get install git
If you want, to remove Git, do:
$ sudo apt-get remove git