What i'm trying to achieve is to have 1 repository on bitbucket, with 2 separate branches, 1 for development and 1 for production.
Lets say I have a repository which has the following files
public_html
- node_modules
- package.json
- scss
- mynotes.txt
- style.css
I need to be able to push all of these files (except the node modules) up to bitbucket so other developers can work on the repo.
I also need to be able to have a separate .gitignore which ignores all files that are not needed for production.
So lets say I have the full development on my local machine which .gitignore looks like this
node_modules
mynotes.txt
And a separate production branch which .gitignore looks like this
node_modules
mynotes.txt
sass
package.json
I then start editing the sass files, which generate a new style.css file and push all of my changes up to the repo.
I then want to ssh into my server, and do a git pull on the production version, but the production version only pulls the style.css file thats been changed, not any of the other files.
Basically what i'm trying to achieve is both production and development being fed off 1 repository. But being able to pull down different files based on different .gitignores.
Sorry if this sounds confusing, its quite hard to explain!
node_modulesto your version control?