seascape-models / seascape_collaboration

This repository is a framework used in the Seascape Lab for collaboration
13 stars 7 forks source link

GitHub flow for branches #32

Closed maxcampb closed 3 years ago

maxcampb commented 3 years ago

Suggested by Phil:

https://www.gitkraken.com/learn/git/git-flow

maxcampb commented 3 years ago

I think that default in a repo should be: commit directly to the main (because it is easier for everyone). However, in cases where we want to use branches (when users are confident using them), I think we should use the GitHub flow model (https://githubflow.github.io/) rather than the git-flow when using branches because it is less complex and should work well considering the size of our team. What do you think @Jinksi?

Jinksi commented 3 years ago

Yeh I didn't give it a name (GitHub flow) but that's the workflow I use with GitHub, I think it is pretty common.

  • To work on something new, create a descriptively named branch off of main branch (ie: new-feature)
  • Commit to that branch locally and regularly push your work to the same named branch on the server
  • When you need feedback or help, or you think the branch is ready for merging, open a pull request
  • After someone else has reviewed and signed off on the feature, you can merge it into master
  • Once it is merged and pushed to 'master', you can and should deploy immediately

Although I skip the extra 'review' most of the time since I am the only one looking at the code.

Don't forget however, if work on the code-base is intermittent/small-scale, it is best to push straight to the main branch, using the KISS principle

maxcampb commented 3 years ago

Ok, thanks! This seems like a good option if we start the widespread use of branches within the lab.