Each time I come across something harder than pull and push with git, I end up fighting doing weird stuff that I could have done probably in one command if I was good at git.
This time I know for sure I am going to reuse the process a lot and I don't want to do it the wrong/long way. So I seek for a git expert to tell me how he would do that. Plus that look like something a lot of people must have wanted to do already.
I have a project on github, and I would like to organize it like that:
1: dev branch
The dev branch contains up to date code, and superfluous stuff used for continuous interrogation, benchmark creation folders, doc creation softwares...
2: master branch
The master would be a branch that reflects only version changes in the history (ie, each time I reach stable step on dev), without the superfluous files used in dev.
3: why
This organization allows master to be an the easy dowloadable point for every stable version of dev, with the addition of having a clear changelog, while the dev branch contains a regular low level technical changes commit history. I think it's really handy.
So I need a way to pull only some folders of the dev branch from master, but without leaving any trace in the history. Then I need to modify some files (version and readme), commit the result with a version changelog message as the message, and finally push to master.
What is the best way to do that according to people versatile in git?
Edit:
It would also resolve my problem if I could pull without pulling any unstaged file. This would allow me to configure as wanted master once and just pull with this option for every release.
Edit: Doing: git checkout dev -- LISTOFSTUFFIWANT work. But I dont find any way to ask git to "checkout everything from this branch except those 3 files"?