On Sat, Aug 04, 2012 at 01:29:14PM -0700, TSU wrote: > Believe these are the steps to at least setup the gh-pages branch using > this github instruction page as guidance > https://help.github.com/articles/creating-project-pages-manua > > - Clone the repo locally > - Create an orphaned gh-pages branch locally > - Remove the existing files (likely the master branch) > > Now, > The github instructions describe how to create a file called index.html and > commit/push the change to github. > After pushing the file to github, as expected the gh-pages branch is also > created remotely. > I was hoping that it should be possible to simply merge the master branch, > ie (while the working branch is gh-pages) > > git merge master > > But, it isn't working, possibly because the operation is being executed > locally and not remotely? If this is the case, is there a "remote merge" > > Am hoping to avoid downloading the master branch, copying elsewhere, then > switching to the gh-pages branch, then copying all the master branch files > into the local gh-pages branch before uploading which is similar to the FTP > workaround (There, you also cannot simply dopy a file, you also have to > download and re-upload).
I don't quite follow: you first say you want to create an orphaned branch (a branch with no history) and then you say you want to merge master into it (bring a particular line of history into a branch). If you want to take certain file from the "master" branch into your "gh-pages" branch, then why not just fork "gh-pages" off "master" and then remove unneeded files and commit? Or the whole issue is that for some reason you don't have the "master" branch locally and want to save bandwidth by not fetching its whole history? Then try something like $ git checkout --orphan gh-pages $ git rm -rf . $ git fetch --depth=1 github master:temp $ git checkout temp -- index.html foo.mkd bar.mkd ... $ git add . && git commit ... $ git branch -D temp That way you do only a minimal (shallow) fetch of the "master" branch. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to email@example.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.