How do I merge back into master without losing my work on github?

I have never collaborated before and now find myself needing to share this project with a few others even though I will be doing 90% of the development.

I have a private repo on github. I pushed my initial source with

  • What is Git's command line diff and log viewer?
  • Git repo still huge after large files removed from repository history
  • Software for Git in the enterprise?
  • Git Checkout reverted code to older commit, how to revert back?
  • git permission denied but for different user
  • What does it mean that a Git push can not be fast foward merged?
  • git push origin master

    then i created a new local branch and made some changes. Then I did some stuff. (It kinda breaks down for me here.) Now, I would like to merge my branch back into master. Locally, it says they’re both up to date but on github, it says my ‘master’ branch has a state of ‘3 behind’.

    Some questions in no certain order?

    How do I get my valid branch merged back into master without losing my work?
    How should I be doing this in the future?

  • git aliases causing “Permission denied” error
  • git push with double dash (git push --)
  • git instaweb gives 403 Forbidden - No projects found
  • how to discard git local branch changes?
  • .gitignore for Joomla component
  • Stuck with Gitolite on OSX
  • One Solution collect form web for “How do I merge back into master without losing my work on github?”

    Step 1: Make sure all your changes are checked in.

    Step 2:

    git checkout master
    git merge <your local branch>

    Step 3:

    git push origin master

    And, if you want to continue working on your local branch, Step 4:

    git checkout <your local branch>
    Git Baby is a git and github fan, let's start git clone.