Unable to update Git on Ubuntu
For new installations of Ubuntu I would first try this to get the latest updates
sudo apt-get dist-upgrade
For more info on this see https://askubuntu.com/questions/81585/what-is-dist-upgrade-and-why-does-it-upgrade-more-than-upgrade
That should solve it but if not, add the repository from these guys https://launchpad.net/~git-core/+archive/ppa
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
This way you don't have to build it, etc.
how to install latest git using apt-get?
Just try it:
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
using git to update itself
"Updating git with git" means updating the git repo sources with a git pull
, once you have cloned https://github.com/git/git.
You would still need to build git from said sources, and install it before seeing a difference in the git --version
command.
See the "INSTALL
" file:
$ make prefix=/usr/local all doc info ;# as yourself
# make prefix=/usr/local install install-doc install-html install-info ;# as root
Since you are installing that updated git in /usr/local/bin, make sure that path comes first in your own $PATH
environment variable (that you can set in your .profile
)
The other way would be to use apt-install (see "How to upgrade Git on Ubuntu Hardy?"), but when I look for the package git-core, the Precise package only goes up to git_1.7.9.5.
That is why building from sources can be an alternative to waiting for git-core to be updated.
How do I update git to its latest version on Linux?
This is due to Ubuntu has not updated the package yet in their repositories. The only way around this would be to compile from source, which you can download from https://github.com/git/git.
git version update is not reflecting
/usr/bin/git
was installed by apt
, so it was upgraded by apt
.
/usr/local/bin/git
was not installed by apt
. And because of that, apt
knows nothing about it. Even if apt
knew about it, it wouldn't be safe to it to touch it, because it wasn't installed by apt
. This is why it was not upgraded by apt
.
What you should do:
- Delete
/usr/local/bin/git
(and related files, such as man pages). - Make
/usr/local/bin/git
a symlink to/usr/bin/git
.
The second step is optional. It will help if a program uses the full path /usr/local/bin/git
instead of just git
. If all programs merely use git
, they will find /usr/bin/git
(via the PATH) once you've deleted /usr/local/bin/git
.
Updating a local repository with changes from a GitHub repository
Probably:
was: git pull origin master
now: git pull origin main
GitKraken won't update on Ubuntu
you just download te install package from the oficial page web(https://www.gitkraken.com/download) and install, thats work for me, sorry for my english
Related Topics
How to Get Sudo Access for a File Inside the Vi Text Editor
How to Make Grep Print the Lines Below and Above Each Matching Line
How Is It Possible That Kill -9 for a Process on Linux Has No Effect
Get First Line of a Shell Command's Output
Starting a Shell in the Docker Alpine Container
How to Install SQL * Plus Client in Linux
Shell Script Current Directory
How to Break Up an Extremely Long String Literal in Bash
How Does Ngrok Work Behind a Firewall
How to Put the Current Running Linux Process in Background
How to Run Multiple Tor Processes at Once with Different Exit Ips
How to Set Up Curl to Permanently Use a Proxy
Recursively Find Files with a Specific Extension
What Is Preemption/What Is a Preemtible Kernel? What Is It Good For
Escaping Quotes When Using Ssh
What Is the Recommended Way to Perform Source-Level Debugging of System Library Calls