I am building a site based on an seed project (MEAN.io) which I cloned from github. How do I separate these files from my own files. As this seed gives a wide skeleton of files, my own files are distributed across the project. I would like to be able to pull updates from the seed, but not mix it with the files I am adding.
I know I can add the seed as a git submodule, but how do I keep my files that I add in this directory away from the seed repo?
Cheers
Commit your files to a branch
.
$ git clone https://github.com/linnovate/mean.git myproject
$ cd myproject
$ git branch myproject # create myproject branch
$ git checkout myproject # switch to that branch
$ echo "A File for just my project" > myfile
$ git commit myfile -m "Adding a file just for my project"
All of your changes will be independent from the seed project. If you want to keep up to date and see where the seed project is all you need to do is this:
$ git checkout master
$ git pull
Now all of your files will be gone and you will see what the latest stuff in MEAN looks like. If you wish for your project to get their changes you would do this:
$ git checkout myproject
$ git merge master
Of course there are a ton of ways to do this (search for tracking branches).
If you intend to use MEAN.io as a subdirectory in your project all of this still applies (just within the submodule).
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