I'd like to use Git in order to facilitate the development of my userscripts (21). Also, I'd like to have them hosted in GitHub too. (using Greasemonkey with Firefox in windows 10).
So, my question is: what is the suggested way to manage my userscripts using Git, in order to also have them hosted in GitHub?
The current folder structure on GitHub is there because I wanted to backup my scripts, just before Userscripts.org when offline. So I just copy-pasted my scripts (with folders) from the
gm_scripts folder. Also because I've used some
@requires before, keeping them in their corresponding folder.
I've not linked my
gm_scripts folder to git because of using git branches for each userscript. The hassle of rebasing branches with the latest master is one reason. Another reason is that you can't work on two feature branches at the same time.
When working on a fix or new feature, I'm of-course working in the
gm_scripts folder. When I'm happy with the live userscript changes, I use WinMerge to sync the changes to my checkout repo folder before committing the changes.
.gitnore file is there, because I used Visual Studio to update the script, but I have changed to Atom long time ago.