I went through a couple of related questions and came up with my own not so good solution and I think there are better ways solve my problem, need suggestions.
Here is the situation.
I have a repo on github with two branches, master and gh-pages ,
master holds a single file (which is a JavaScript plugin) and no directories whatsoever.
gh-pages holds all the code for the sample site where I am demoing the plugin. It holds images, css, html, dependence libraries and the plugin file itself.
Now, in my local repo when I make changes to the plugin file, I am on the gh-pages branch since I have to test if it works correctly. Once I am done modifying, adding or fixing things in the plugin I commit it to the gh-pages branch. To bring the updated plugin to the master branch I do the following.
git checkout master
git checkout gh-pages js/lib/Plugin.js
This brings the whole directory(js/lib/Plugin.js) with the Plugin file to my master branch. Then I have to manually replace the previous plugin file with the one brought in by the above command and then commit it to the master branch.
This solution seems very tedious and janky to me. Is there a better way to achieve the result?
on local macchine you do the changes and then
This updates the repository