Created
October 13, 2017 07:48
-
-
Save BashCloud/714538694af905059b2b59d67036805c to your computer and use it in GitHub Desktop.
Submodule a branch on git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git checkout -b [name_of_your_new_branch] | |
$ git push origin [name_of_your_new_branch] | |
$ git branch | |
$ git checkout master | |
$ git submodule add -b gh-pages git@github.com:blindgaenger/foobar.git _site | |
$ git status | |
# On branch master | |
# Changes to be committed: | |
# (use "git reset HEAD <file>..." to unstage) | |
# | |
# new file: .gitmodules | |
# new file: _site | |
# | |
$ git commit -m "added gh-pages as submodule" | |
$ git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment