I'm using Netbeans with Git (hosted on github).
Github uses a special branch in the git repository, "gh-pages", whose content is hosted on their site.
My project generates a stylesheet and demo webpage, which I'm hosting on github to demonstrate the generated stylesheet. In order to do this, I usually just copy the entire "master" branch into "gh-pages" branch and clean-up the "gh-pages" branch afterwards. Needless to say this isn't the most ideal way of working.
I'd like to be able to copy a single file from the "master" branch into the "gh-pages" branch, preferably using just Netbeans' builtin Git support. Is there any way to do this?
not sure about netbeans. But you can simply checkout the file from master when on the other branch with:
git checkout master -- path/to/the/file/you/want/file.txt
Also, you can read out the file with
git show master:path/to/the/file/you/want/file.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With