Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

publishGitbook() should check for existing gh-pages branch on github #12

Closed
wabarr opened this issue May 6, 2014 · 2 comments
Closed

Comments

@wabarr
Copy link
Contributor

wabarr commented May 6, 2014

I think this might be preferable to current behavior of initializing an empty local repo and force pushing it onto github. The flow would be

  • if gh-pages branch exists
  • stash local changes
  • pull from remote
  • apply stashed changes
  • push

This would preserve gh-pages commit history. It would also prevent forcible overwrite of other files in the gh-pages branch that are not used by gitbook, such as supplementary data files, or a CNAME file (which is necessary for custom domain name using github pages). Such files currently get forcibly overwritten in the current behavior, even if added to .gitignore file.

@wabarr wabarr changed the title publishGitbook() should check for existing gh-pages branch on github publishGitbook() should check for existing gh-pages branch on github May 6, 2014
@wabarr
Copy link
Contributor Author

wabarr commented May 8, 2014

I found your related discussion of this with ramnathv. Maybe another option is to have an option to add other files (like the CNAME file) when publishing to github. GitbookIO/gitbook#106 (comment)

@wabarr
Copy link
Contributor Author

wabarr commented May 8, 2014

This pull request solves the problem I was having. #14

@wabarr wabarr closed this as completed May 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant