Skin Development & Git advice
#1
Hi

Ive been playing around learning how to create my skin and have been making some real progress.

I used 2 computers for my skin development, my main when at home and a laptop whilst I'm at work and i keep them in sync with a folder within my dropbox.

Ive noticed that a lot of people use git to store their skins so i thought i would do to, love how it shows the changes between files, this will be very handy when i make a mess up or change something inadvertently Smile whilst I'm learning.

Now for the questions,

I was able to create the git repository in bitbucket, clone it and then upload my files to it with git status then git add . then git commit and finally git push.

Is this the usual practice concerning getting files and changes to git?

How do i get the files down to the laptop?

From what I read is the process to use git pull, do i pull the files to the laptop work on them then go through the process of git status git add . then git commit and finally git push. again to push the changes back.

Then on main comp do i git status and git pull to get the latest versions to the main comp?

Sorry total new to git and only skimmed the manual and just want to get into a good working practice.
Old newbie trying his hardest to get his head around skinning lol, expect loads of questions :-)

It may be hard but the challenge of learning something new is fun :-)
Reply
#2
(2012-10-30, 13:50)Icerat Wrote: Hi

Ive been playing around learning how to create my skin and have been making some real progress.

I used 2 computers for my skin development, my main when at home and a laptop whilst I'm at work and i keep them in sync with a folder within my dropbox.

Ive noticed that a lot of people use git to store their skins so i thought i would do to, love how it shows the changes between files, this will be very handy when i make a mess up or change something inadvertently Smile whilst I'm learning.

Now for the questions,

I was able to create the git repository in bitbucket, clone it and then upload my files to it with git status then git add . then git commit and finally git push.

Is this the usual practice concerning getting files and changes to git?

How do i get the files down to the laptop?

From what I read is the process to use git pull, do i pull the files to the laptop work on them then go through the process of git status git add . then git commit and finally git push. again to push the changes back.

Then on main comp do i git status and git pull to get the latest versions to the main comp?

Sorry total new to git and only skimmed the manual and just want to get into a good working practice.

add --> commit --> push is correct for new files. otherwise commit --> push is enough.
after doing that the changes are included in the online repository.
other machines with a cloned repo can get the changes then with git pull and use the same workflow described above.
so basically when you want to work on your skin:
1) make sure your local version is up-to-date by using git pull
2) make your changes and push them

once you feel comfortable with these basics, you can start lookin into more advanced stuff like different remotes, rebasing etc.
when you have understood how GIT works try SmartGIT. makes things a lot easier.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#3
Hi Phil65

Been using git for a few days now and getting used to it been using it on my main machine and haven't bumped into any problems yet.

All I've been doing though is just:

git status > git add . > git commit -m "message" > git push -u origin master

Question though:

When I'm on my laptop I do a git pull to get the latest files from the server but Is there a way to see what if any files are different from the files stored on the server and the files on the laptop or is it always a git pull?

To upload the files from the laptop I just repeat the steps listed above, it this correct?
Old newbie trying his hardest to get his head around skinning lol, expect loads of questions :-)

It may be hard but the challenge of learning something new is fun :-)
Reply
#4
To fetch changes from origin:

git fetch origin

This updates all the origin/<foo> branches locally.

Then you can git diff origin/master from your local master branch to see the changes.

And git rebase origin/master or git merge origin/master to rebase or merge those changes in. These are the same if you have no commits locally (the merge will fast forward) else you'll get a merge commit with the latter, while the former reverts your local commits, moves your local branch to be the same as the remote branch, then pops your local commits back on top.

Google for the git parable if you want to read a nice little bit about why git works like it does.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
Been reading up on branches and am little confused.

Am I right in my understanding of how it works?

I have my main branch and say I want to have a play with some files but instead of playing with the main files and risk breaking something I create a test branch.

Now in this test branch I make a bunch of changes and they turn out to be for the better am I right in saying I can then merge these changes back?

To create the branch I used git branch test1 and git checkout test1 to switch to the branch.

I know I can use git checkout -b (branchname) also but wanted to get this in my head first.

What I cant figure out is where are the files stored for the test branch, is it meant to create a duplicate of my master files so that i can work on them with out touching the source files?

Have i missed something or did i understand this all wrong.
Old newbie trying his hardest to get his head around skinning lol, expect loads of questions :-)

It may be hard but the challenge of learning something new is fun :-)
Reply
#6
git stores the differences between branches, so that when you switch branch, it updates the existing files with the changes from the other branch (subtracting off the changes from this branch). It all happens transparently, so you don't notice it.

Unlike SVN, it does not create a completely separate tree in each branch. Thus, branching is cheap, and hence why it is encouraged.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
Thanks for reply, now i going to sound like the noob that i am, so what do i, how do i commit to a branch?

Do i edit my files like normal and then git push to a branch and the changes get stored in the branch?

If i decide i don't like the changes how do i get my files back to before i branched and changed them, Is it a git pull from the master?

Sorry for all the stupid questions who would of thought me deciding to learn how to change and create my own skin would have grown into this?

Thanks again.
Old newbie trying his hardest to get his head around skinning lol, expect loads of questions :-)

It may be hard but the challenge of learning something new is fun :-)
Reply
#8
(2012-11-05, 12:17)Icerat Wrote: Thanks for reply, now i going to sound like the noob that i am, so what do i, how do i commit to a branch?

Do i edit my files like normal and then git push to a branch and the changes get stored in the branch?

If i decide i don't like the changes how do i get my files back to before i branched and changed them, Is it a git pull from the master?

Sorry for all the stupid questions who would of thought me deciding to learn how to change and create my own skin would have grown into this?

Thanks again.

better read some tutorials. it doesn´t make sense explaining those stuff because it was already explained 1000x all over the net.
here are some:
http://sixrevisions.com/resources/git-tu...beginners/
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply

Logout Mark Read Team Forum Stats Members Help
Skin Development & Git advice0