[Tutorial] Installing an addon/skin using Git

  Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
htpc guy Offline
Posting Freak
Posts: 1,187
Joined: Oct 2010
Reputation: 7
Location: Near St. Louis Mo
Post: #1
I see this asked over and over again. I've probibly posted this same thing several times in an attempt to help someone out. So I decided I would post this here. Hopefully a kind moderator will stumble upon this and move it to the Tips and Tricks section and possibly Sticky it. Any addon/skin developer is welcome to link to this.

What is Git? This is from Wikipedia:
Quote:Git (/ɡɪt/) is a distributed revision control system with an emphasis on speed.[4] Git was initially designed and developed by Linus Torvalds for Linux kernel development. Every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server. Git's current software maintenance is overseen by Junio Hamano. Git is free software distributed under the terms of the GNU General Public License version 2.
In short, for programmers its an efficient way for them to collaborate on a project. I'm not going to go too in depth here. There have been books written on the subject that go way beyond the scope of my discussion here. You are here because you want to install an addon/skin in xbmc using git. Why would you want to do this?

XBMC has a ton of useful addons and you don't even have to get up off your couch to install them. On the other hand there are tons of equally cool addons that are only available here in the forums. If you want to install them then you have to grab the .zip file, copy it to your addon directory or install from .zip in xbmc. Its a pain, especially if you are just updating the addon. Then, after you install the addon with Git it is even easier to update it. You don't need to visit the forums. Just open the Git terminal, drop in a few easy commands and your addon is updated.

But this command line stuff is scary!
Its not scary. Using a command line or terminal may seem nerdy but that is not a bad thing. Your computer is not going to self destruct if you do something wrong. Worst that can happen is you typo something. In this case the command line or terminal will tell you it can't do whatever it is that you are telling it to do. Nothing blows up. No kittens are murdered. You just have to retype your command. If you can type something into a Word document then you are more than qualified to follow the few easy steps that I will list below.

How do I install an addon/skin suing Git?

Step 1: Install Git from here: http://git-scm.com/download
I'm not going to cover the installation. It is documented on the Git website, and really, if you need help installing a program then how on Earth did you install xbmc?

Step 2:Locate a Git Repository
You have found a thread in the forums that informs you of a cool addon that you must have right now! Within the first post of the thread the author lists a url for a Git Repository. Following the link will take you to the addon authors Git Repository page. Make sure you have the Git radio button selected like in the picure. Copy the url from the text box. It will be formated like:
[Image: scaled.php?server=846&filename=g...res=medium]

Step 3:Open the Git Terminal
[Image: scaled.php?server=825&filename=g...res=medium]

Step 4:Now change the directory to the path for your XBMC addons by typing in the text below. This will vary depending on your Operating System. Adjust the paths accordingly if you are not using Windows
cd '/c/Users/[Username]/AppData/Roaming/XBMC/addons/'
[Image: scaled.php?server=828&filename=g...res=medium]

Step 5:Clone the Git Repository into your XBMC Addon Directory
In the terminal, use the command "git clone" followed by the git url that you copied from the addons git repo in step 1. If you like at this point you can simply type "git clone" (without the quotes) and press insert on your keyboard (if you copied the git url to your clipboard). Now press enter and watch as Git downloads the addon directly to your XBMC addon directory. Its as simple as that. Now you just have to open XBMC and your addon is installed.
git clone git://gitorious.org/xbmc-addon/cool-addon.git
[Image: scaled.php?server=851&filename=g...res=medium]


How do I update an addon that I previously installed from Git?

Step 1: Open the Git Terminal and change directory to the location of the XBMC addon
cd '/c/Users/[USERNAME]/AppData/Roaming/XBMC/addons/cool-addon'
[Image: scaled.php?server=560&filename=g...res=medium]

Step 2: Update your addon
Now type "git pull" (without quotes) and your addon will be updated. No browsing to the forums or Git Repository. Its a simple as that!
git pull
[Image: scaled.php?server=69&filename=gi...res=medium]

How to use Git
| AMD Athlon II X3 Triple Core Processor 2.9 GHz |GIGABYTE GA-MA785GM-US2H Mobo 2GB DDR2 Ram | MSI N430GT |
| Logitec Harmony Smart Control Remote| 52" Sharp Aquos LED TV | Denon AVR-X1000 |
| Freenas Server with 18TB ASRock Intel Avoton C2750 |
find quote
jungario Offline
Junior Member
Posts: 20
Joined: Apr 2012
Reputation: 0
Post: #2
just to say THANK YOU!
find quote
un1versal Offline
Out of Memory (1939–2016)
Posts: 7,134
Joined: Oct 2012
Location: Binary Pulsar
Post: #3
Suing git -> using git

XBMC - > Kodi

Also FYI github for windows (by github) is better and even easier than this tool.
(This post was last modified: 2015-04-27 08:10 by un1versal.)
find quote
nickr Offline
Team-Kodi Member
Posts: 17,015
Joined: May 2009
Reputation: 338
Location: Christchurch NZ
Post: #4
And I have to say that this seems very windows oriented!

Also it is probably far easier to download the zip file provided by the git site and install from zip.

If I have helped you or increased your knowledge, click the 'thank user' button to give thanks :) (People with less than 20 posts won't see the "Thank you" button.)
find quote
Fail$tyle420 Offline
Posting Freak
Posts: 1,084
Joined: Jul 2014
Reputation: 39
Post: #5
Thank you for the EXTREMELY well written guide! I will def be looking into this when I get home! I have a few ideas to incorporate now!
find quote
jmcguire525 Offline
Junior Member
Posts: 23
Joined: Feb 2015
Reputation: 0
Post: #6
If I download the repo zip file from GitHub will it automatically update addons/skins?
find quote
Warner306 Offline
Posting Freak
Posts: 2,612
Joined: Feb 2014
Reputation: 90
Location: Canada
Post: #7
(2015-07-31 08:50)jmcguire525 Wrote:  If I download the repo zip file from GitHub will it automatically update addons/skins?

No, but this link can help: http://forum.kodi.tv/showthread.php?tid=229467
find quote
teemue Offline
Junior Member
Posts: 39
Joined: Jul 2013
Reputation: 0
Post: #8
Can this be done with RPi (Openelec/LibreELEC) as well?
find quote
Av3nged Offline
Senior Member
Posts: 111
Joined: Feb 2016
Reputation: 8
Post: #9
(2016-06-16 13:07)teemue Wrote:  Can this be done with RPi (Openelec/LibreELEC) as well?

They are Linux so it might have git but if for some reason it does not you can use wget to do the same thing.
find quote