state of being up to date after accepting a pull-request and branches

Hello,

on a new github project I created 2 new branches next to master - “contrib” which is meant for contributions of other people and “remote” that is accepting my changes from at home. But when people fork master, do changes and send a pull-request it will end up in master, right? Or will there be a way to select in which branch the changes go? And lets say I merged everything into master will the other two branches be up to date automatically?

Thanks in advance,

P.

Hi @cleymspaze,

Thank you for being here!  You can tell git when you want to checkout the branch with:

git checkout <name>

``

This will put you on the new branch before committing changes. With GitHub, you can deploy from a branch for final testing in production before merging to master. Also, publish your changes to the remote by using “git push” from time to time.

For instance your workflow may look something like this: 

  1. Create a private branch (remote) off a public branch, in your case the contrib branch.
  2. Regularly commit your work to this private branch.
  3. Once your code is perfect, clean up its history.
  4. Merge the cleaned-up branch back into the public branch.

I hope this helps! I look foward to other folk advise on best practice here. For us the GitHub flow is the norm.

1 Like