I have a web application that I store on Github. I created a dev branch for this project a couple of years ago but since that time, I have never merged "dev" into "master". I've been doing all my work in "dev" (or feature-related sub-branches of dev) and then pulling that dev branch down to my production server. I know this is stupid but it's what I did. Today I decided to finally merge my dev branch into my master branch so I can start pulling master down to my production server. I came across this question which suggests merging master into dev first and resolving any conflicts in dev before merging dev into master. This seemed like a good idea since I'd never merged my dev into my master. But when I followed those instructions and merged master into dev, Git said "Already up-to-date.":
$ git br
* dev
master
$ git checkout dev
Already on 'dev'
Your branch is up-to-date with 'origin/dev'.
$ git merge --no-ff master
Already up-to-date.
Could I have unwittingly been pushing my dev commits to my master branch all this time? If so, once I push master back up to my remote repo and switch back to my dev branch to continue work, should I ensure that I'm creating a separate remote copy of my dev branch on Bitbucket (for backup purposes) with this "push... --set-upstream" command...
$ git checkout dev
(do work and commit it)
$ git push --set-upstream origin dev
and then follow the procedure I initially described above whenever I want to merge any additional changes in my dev branch to my master branch? From this point on, I want to make sure I keep dev separate from master but I always want to keep a copy of my dev branch on Github for backup purposes.
Thanks!