It is currently March 28th, 2024, 9:08 pm

An Introduction to Using GitHub with Rainmeter Skins

Tips and Tricks from the Rainmeter Community
User avatar
exper1mental
Posts: 269
Joined: January 9th, 2013, 7:52 pm
Location: Clemson University

An Introduction to Using GitHub with Rainmeter Skins

Post by exper1mental »

Why use GitHub?
GitHub can be an awesome tool to use with your Rainmeter projects. Among many other things you can use it to keep track of all your changes, create variation of the same skin, easily collaborate with others, and it can serve as a backup in case you loose your local Rainmeter files.

However, if you are like me and have never used GitHub before in your life it can be a bit of a headache trying to figure out how to use it. The goal of this guide is to help others learn the basics of using GitHub with their skins.

NOTE Bear in mind that this is literally my first time writing a guide and I am still refining it. :oops:


Setting up GitHub (as of 03/18/16)
In order to use GitHub with a Rainmeter skin, we need to create a new repository. What's a repository you ask? It is "a central location in which data is stored and managed."

Requirements
  • Windows 7 or newer (technically speaking you could also use GitHub to edit Rainmeter skins on a Mac :sly: )
  • A decent internet connection
  • A GitHub account (Create account here)
  • GitHub Desktop installed

There are three basic ways of setting up a repository for a Rainmeter skin in GitHub Desktop.
  • Option 1 Creating a new local repository
    • USE FOR Locally installed skins (meaning, skins located in Rainmeter's Skins folder). You can also use this if you want to create a new skin folder for a new project.
    Option 2 Cloning a repository
    • USE FOR Downloading one of your Rainmeter skin repositories off of GitHub.com.
    Option 3 Adding a local repository
    • USE FOR Adding a local Rainmeter skin repository that is not currently listed in GitHub Desktop (such as a repository you accidentally removed from GitHub Desktop)
Currently I have only written a guide for Option 1 but soon guides for both Options 2 and 3 should be up!


Option 1 - Creating a new local repository
Open the spoiler to view the guide ;-)
1. Open GitHub Desktop

2. Click the + sign in the upper left-hand corner of the window and then select Create

3. Hit Browse and select the folder Rainmeter stores skins in (usually %USERPROFILE%\Documents\Rainmeter\Skins). Do not select the specific skin you want to add. If you do you will end up creating the GitHub repository in a sub-folder of the skin.
SkinsFolder.png
4. Enter the name of your skin (If you are adding an existing skin, the skin's folder cannot contain spaces because GitHub replaces spaces with dashes for the folder name). If you are creating a new skin, this is where you need to decide on it's name. After this point you will basically have to delete the repository in GitHub Desktop if you decide you want to change the skin's folder name. However, you can use a different name for the skin when publishing it to GitHub.com. When are finished hit Create Repository
CreateRepository.png
NOTE You now have a created a repository on your computer, but it still isn't uploaded to GitHub.com yet. You can stop at this point if you want to only use GitHub locally with your skin. However, if you want to be able to upload and backup your work to GitHub.com you need to read on (you can easily complete this process later if you prefer).


Uploading a local repository to GitHub.com
1. Select your newly created repository in the left pane (if it isn't selected already).

2. Select the Changes tab, make sure all files you want included are selected, Give your commit a title (and optionally a description), and Commit to master (I'll explain what exactly the master is later)
InitialCommit.png
3. Once the program is done committing hit the Publish button in the upper-right hand corner.
Publish.png
4. Finally, choose the name you want to use for your skin in GitHub.com (I recommend using the same name as the skin's folder name but you should be able to use something else if wanted)
Publish2.png
You now should see the skin listed in your profile on GitHub.com. In GitHub Desktop the Publish button should now be replaced with the Sync button. You can use this to upload new commits to GitHub.com.



Using GitHub (Under Construction)
Commits to what?!
At first many of the features and terminology of GitHub seemed strange and foreign to me. In this section I will explain how to use some key features of GitHub with Rainmeter skins.


Any questions, comments, feedback, and suggestions are welcome!
Hope you find this helpful! :welcome:
You do not have the required permissions to view the files attached to this post.
Last edited by exper1mental on March 18th, 2016, 5:15 pm, edited 3 times in total.
Image
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5383
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: An Introduction to Using GitHub with Rainmeter Skins

Post by eclectic-tech »

An interesting idea... 8-)

I used your guide, and the help on GitHub, to create a test repository and modified the files and committed them to GitHub... You are right, it is a bit different than working with local files.

This would be a convenient way to collaborate on skin creations (if a few people were interested in trying that).

The forum policy is not to write skins based on request, and I totally agree with that.

But I think a section where skin authors can collaborate on a skin project, develop their coding techniques, by seeing how other authors solve issues, while developing a skin project with common shared (or forked) code(s), could be a beneficial.

Anyway, an interesting use of GitHub; I guess we will wait and see what any other members think. :confused:
User avatar
winterwulf
Posts: 94
Joined: August 17th, 2016, 1:48 am
Location: São Paulo - Brazil

Re: An Introduction to Using GitHub with Rainmeter Skins

Post by winterwulf »

It seems a lot safer than work only locally... I am gonna give it a try once I get vacations from college

thanks for the hint :thumbup:
MikeG621
Posts: 87
Joined: March 18th, 2013, 1:59 pm

Re: An Introduction to Using GitHub with Rainmeter Skins

Post by MikeG621 »

I use it for my programming projects, and also review/proofread a friend's lectures (done in LaTeX) before his class gets them on there. It's more meant for collaboration, but it certainly works for solo backups and version tracking.