Github - branch common usage

as far as I know the recommended usage of branches in github is that the ‘master’ branch is supposed to be a working product

I think ERPNext follows this default branching recommendation, right?

If the above is the case I think we should try to convince all Community contributors to comply to that default naming of branches in the same way.

I am aware that in most cases at the beginning there will be no ‘master’ branch and one has to manually make a ‘develop’ branch at the start (I think github creates the branch ‘master’ by default)

If we can achieve that you’d never had any doubts whether any App is in development or production ready (at least in the eyes of the author)

nobody?

so whats your plan?

@Mike_Krol my plan is to

  1. confirm at first my assumptions are correct. If you have any input on this I’d be happy to hear that
  2. if the assumptions about common practice in naming branches are correct and are being used in the same manner in the ERPNext world the plan would be to remind anybody who’s repo I (or anybody else) came across about this common practice (‘master’ always being a workable app) which includes that once you don’t have a working app yest your branch shouldn’t be ‘master’

agree,
if there is not a working app, the branch should not be “master”
but this rule would have to come from the powers that be

@anand (or anybdoy else at Frappe) can you confirm that you follow this common practice for naming your branches (and therefore any Community Apps repositories ideally should follow this as well) ?

Development happens in develop.
master is stable.
We also do releases.
Have a look at our github repo.
install using setup_frappe.sh --setup-production and you get master branch, but for development you get develop branch.

I have a doubt, i installed erpnext for development. I have develop branch in my local. When i do git checkout master it says switched to a new branch master.
is that the same master branch?
If i have some customization then should i do that in this master branch?

@ninjas005 you will need to maintain your own customizations. Do read up on how git works. This will help you get unstuck.

To check if your switch was successful, compare git log output with the master branch commits at github.com/frappe/frappe and github.com/frappe/erpnext

Hi @anand, Thank you for your answer.
I suddenly forgot how to pull remote branch to local. That’s why i’ve asked that stupid question. pardon me.

@anand, @vrms
Please tell me how can I add new erpnext updates to my customizations

This is how i figure out how I need to work if my client needs a customized erpnext. Please Correct me if I am wrong

  • I need to get master branch
  • make it a new git repository by removing .git and upload it in github
  • clone it to local create a new branch from master say ‘ninjas_stable’
  • make changes in my branch, merge it to master and push it
  • install this erpnext repo to the clients server

If the above method is correct, then how can i add new updates to it.

This looks like a very complicated way to go about it.

Just make a fork of erpnext, and keep merging upstream changes into your fork when you need to. You will need to resolve merge conflicts.

-Anand.

honestly I am not 100% follwowing what you are trying to do. But if you had a standard ERPNext with some custom Apps (so everything you call “customization” here) … there shouldn’t be any need to create anything like a “custom ERPNext” or so.

bench update ernext keps your ERPNExt instance up-to-date, bench update [whatever_custom_app] takes care of your custom apps

disclaimer: I say this without much technical insight.