Keeping master and development branches on same commit number?

I am using Github. I added my files to master branch on Github, then cloned master branch to development branch. Commit # is the same at that point.

I have 2 linux nginx servers (one production, one development). One I did a git checkout master on, the other a git checkout development. They have the same files at this point.

In PHPStorm, I created a new project based off the Github repo. I created a local branch off of the origin/development branch. I then committed/pushed it to the origin/development branch. Github says that the development branch is one commit ahead of the master branch, that makes sense.

Now I did a git pull to get it on the development linux nginx server for testing, and it tested good. Now I want to push my local branch to the origin/master branch in PHPStorm so I can do a git pull on the production linux nginx server. From what I read I have to do a cherry pick of the commit in PHPStorm. I did that, and pushed it to the origin/master branch. Now Github says it is one ahead, and one behind the master branch.

Am I doing this right? Should I not be doing the cherry pick, but instead be logging on the production nginx box and merging the origin/development branch into the origin/master branch? Only problem I see there is if I have 2 local branch features pushed to the development branch, but do not want to push them both over to the master branch yet.

Any help or guidance?! Thanks!

0

请先登录再写评论。