Thread Rating:
  • 3 Vote(s) - 5 Average
[Tutorial] Installing an addon/skin using Git
#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?

Why?
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:
Code:
git://gitorious.org/name-of-repo/name-of-addon.git
Image

Step 3:Open the Git Terminal
Image

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
Code:
cd '/c/Users/[Username]/AppData/Roaming/XBMC/addons/'
Image

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.
Code:
git clone git://gitorious.org/xbmc-addon/cool-addon.git
Image


____________________________________________

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
Code:
cd '/c/Users/[USERNAME]/AppData/Roaming/XBMC/addons/cool-addon'
Image

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!
Code:
git pull
Image
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 |
Reply
#2
just to say THANK YOU!
Reply
#3
Suing git -> using git

XBMC - > Kodi

Also FYI github for windows (by github) is better and even easier than this tool.
Reply
#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.)
Reply
#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!
Reply
#6
If I download the repo zip file from GitHub will it automatically update addons/skins?
Reply
#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
Reply
#8
Can this be done with RPi (Openelec/LibreELEC) as well?
Reply
#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.
Reply



[Tutorial] Installing an addon/skin using Git53