Documentation for contributing code back to community


I am working on fixing Invoice round off does not get reflected in accounts · Issue #8816 · frappe/erpnext · GitHub and looking for some help with the process. The pain points for me are

  1. Maintaining my forked repository up-to-date with the erpnext repository
  2. Making sure my changes are fine by running tests

Looking for this information, I found Git Help - Sync my repo (frappe fork) to latest frappe repo - #2 by priya_s which seems to answer (1). However I am still struggling to get the tests running using online help. My changes are in accounts/sales_invoice, so I am looking at running all the tests in accounts module, but can’t get it working. Could some one please point me to any existing documentation that clearly shows how to contribute code back to the community?


Mostly its git flow.

Have you looked at Contribution Guidelines · frappe/erpnext Wiki · GitHub ?

Thanks. I have gone through that link about the guidelines. However what I am missing is the actual steps. I think I have understood the git part now, but not

Perhaps it even makes more sense to have a ‘buddy’ from core/foundation team to get first 1-2 commits of a potential contributor accepted.

Just start a pull requests. The tests will automatically run!

Thanks, that is one way, though I prefer running the tests before sending the pull request. I am still struggling with the git after 4-5 hours of experimentation and reading, so really need some help.

spoojary@osboxes:~/factory-skpi/apps/erpnext$ git remote -v
develop GitHub - sathishpy/erpnext: ERP made Simple (fetch)
develop GitHub - sathishpy/erpnext: ERP made Simple (push)
upstream GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) (fetch)
upstream GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) (push)

spoojary@osboxes:~/factory-skpi/apps/erpnext$ git pull --rebase upstream develop
From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)

  • branch develop → FETCH_HEAD
    Current branch develop is up to date.

I understand it is saying my forked repo is up-to-date with ERPNext master repo

spoojary@osboxes:~/factory-skpi/apps/erpnext$ git status
On branch develop
Your branch is ahead of ‘upstream/develop’ by 2 commits.
(use “git push” to publish your local commits)
Untracked files:
(use “git add …” to include in what will be committed)


nothing added to commit but untracked files present (use “git add” to track)

I don’t want to commit the untracked ones, which is still a work-in-progress

spoojary@osboxes:~/factory-skpi/apps/erpnext$ git push develop
Username for ‘’: sathishpy
Password for ‘’:
To GitHub - sathishpy/erpnext: ERP made Simple
! [rejected] develop → develop (non-fast-forward)
error: failed to push some refs to ‘GitHub - sathishpy/erpnext: ERP made Simple
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: ‘git pull …’) before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push --help’ for details.

Checking GitHub - sathishpy/erpnext: ERP made Simple, it says I am 1455 commits behind frappe:develop. What am I doing wrong here?

Looks like I can use ‘git push -f’ to force the updates. I will give it a try…

Ok, I have managed to send the pull request now. I will close this thread when I understand how to run the tests properly.