Skip to content

Instantly share code, notes, and snippets.

@tbekaert
Last active March 14, 2018 14:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbekaert/d5e2a917cc9e9439cd80aa612ad3beed to your computer and use it in GitHub Desktop.
Save tbekaert/d5e2a917cc9e9439cd80aa612ad3beed to your computer and use it in GitHub Desktop.
Adding frontend_starter as subtree

Adding frontend_starter in any project

Create your new branch in frontend_starter and push it on github

Inside frontend_starter folder, type those instructions :

$ git checkout -b <branch-name>
$ git push origin <branch-name>

Then you can create your styleguide, even if the backend of your final project is not ready yet.


When your backend is ready and you're sure where you want to include the frontend_starter project, follow those command inside the backend project :

Add remote to frontend_starter repo for this subtree

$ git remote add frontend git@github.com:siliconsalad/frontend_starter.git

Add frontend_starter at right path and from right branch

$ git subtree add --prefix=<output-path> frontend <branch-name>

Then, to update frontend_starter branch with the modifications you did on the backend repo, follow those instructions, from backend projet folder :

Push modification to frontend_starter branch

$ git subtree push --prefix=<output-path> frontend <branch-name>

Pull modification to frontend_starter branch

$ git subtree pull --prefix=<output-path> --squash frontend <branch-name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment