However, there's so many "if...else if...else if..." kind of talk going on I have no idea what to do. One post suggests using this WANDisco's repository and another person is saying to use a rpm repo. It goes on into saying if you have version 1.8 there's something special you need to execute from the command line. Most of these descriptions are very poorly explained from a newbie standpoint. Would someone be so kind in helping me understand each command that is needed to do the following...

Install the latest version of Git

Ensure that whenever I do <sudo yum update> I'm bringing in updates from Git. Also how does this work? Where is this magical file that allows me to enter a repo url and make <yum> use it every time I do <yum update>. Is there something I should be aware of that can get a person into trouble with conflicting repositories or whatever?

Lastly, help me delete the old version of Git. How is this done? Where is Git installed and how do I ensure I'm not deleting the new Git I installed above?

I'm also wondering if you phrased this bit right or if you have a misunderstanding about how stuff works:

Ensure that whenever I do <sudo yum update> I'm bringing in updates from Git.

Did you mean "updates TO git"? Because yum doesn't pull updates from git, it looks at yum repos, nothing to do with git at all. Now updates TO git packages come from the yum repos so when e.g. IUS updates theirs then yum will update them for you.

CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

@TrevorH ~ I appreciate your attention to detail in how I word things as it's very helpful. I believe there's a slight misunderstanding on my end but I do follow your explanation.

My misunderstanding is mainly on the following two commands. I've tried these and I'm able to update the latest now but there's still some confusion (on my part) as to what the following "actually" does.

Why do I need to <yum install ...> git again with the first command above? Git already exists (even though it's old) on my system so installing it a second time makes no sense to me. Did this "wandisco" not exist before?

I didn't realize I could specify certain packages to update like this (yum update packageName). It is my understanding I've installed Git "again" along side of an existing installed git (the older version). Perhaps my understanding of what the first command does is wrong?! If not, how does yum know which installed git should be updated from issuing the second command above? How can I delete the old version?

Your first command installs package that sets up a new yum repo - one I've never heard of and is not our recommended list. The second command then updates the git package and finds a newer version in the new repo that you just installed.

We don't generally recommend third party yum repos that replace packages from CentOS repos. This wandisco thing is doing that. Having added that repo, you will now get any other updates to any other packages that they provide that are newer than ours. This is one reason why we tend to recommend IUS as a replacement since they name their packages differently (git2u vs git in this case) so adding their repo will not automatically replace CentOS supplied packages. You have to specifically install their replacement and (for the ones I've used) they conflict with the original so you cannot have both installed.

Also, WHY are you doing this anyway? CentOS packages may be old but they are stable and that's the main advantage of CentOS. Stuff doesn't change on a developer's whim, it stays the same for the entire 10 year lifespan of the distro. Security updates are then backported by Redhat to their versions of the packages so things stay secure.

CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

There are a small set of features in git version 2.17 I want (hate to be "that guy" but I want to stay up to date). If you really want an explanation I'm giving an interactive presentation on Git to my company and I would like to show some differences between older versions and new versions of Git. Do you recommend I...

CentOS packages may be old but they are stable and that's the main advantage of CentOS. Stuff doesn't change on a developer's whim, it stays the same for the entire 10 year lifespan of the distro.

The SCL (Software Collections) packages that were already mentioned, do have shorter lifetime (3y?).

Their packages are named differently (just like IUS does), but the binaries have identical names.
You determine the available toolset version(s) in each shell session with 'scl' utility (rather similar ideology as in Environment Modules system).

The main difference between SCL and IUS is that SCL's install in parallel with the original set of packages and need special action (scl enable) taken to invoke them. IUS installs replacement but differently named packages that replace the original executable and no special action is required to be able to use them.

CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke