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

  • programmatically detect current git branch checked out from C# code
  • How to run Git 1.6.x for Windows from a USB memory stick
  • Git - Github push history
  • What's the equivalent of use-commit-times for git?
  • How can I move the entire git repository somewhere else?
  • GIT: how to merge two branches without actually merging files (trivial merge)
  • 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?

  • How to use Git correctly in Android Studio?
  • Github for windows - ssh-agent.exe using high CPU + 100% disk?
  • Signed powershell script not signed after source control
  • Add symlinks to git repository
  • Git gets confused with ä in file name
  • move branch so that it branches off from master in git
  • 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.