How to create and share remote branches?

How to create and share remote branches? I want to publish a local branch for future collaborative development. How to do it right? Several developers will insert changes into this branch. For exampe:

Host 1:

git branch

 master
*idea

git push origin idea

Host 2:

git pull origin

git checkout originj/idea

git brunch idea

nano … make profit

git commit -a -m “profit”

git push origin idea

But something is wrong. We can not post changes. I read the documentation, is there something about --set-upstream-to, but understood nothing :slight_smile:

first push origin you should ,

$ git push -u origin idea

Thank you.

And another user use:

git fetch origin

git checkout -b idea origin/idea