Skip to content

Agri farm ERPNext PR git primer

Tao Xen edited this page Nov 21, 2017 · 4 revisions

Steps to setup development environment and contributing changes to the agri-farm-erpnext branch.

Fork erpnext to your user or organization repository

  1. fork erpnext

On your development machine (virtualbox linux, for example)

  1. git config -e
  2. This opens the .git/config file
  3. Make sure your remote upstream fetch configs look something like this (by default get-app fetches only the develop branch)
	[remote "upstream"]
	      url = https://github.com/frappe/erpnext
	      fetch = +refs/heads/develop:refs/remotes/upstream/develop
	      fetch = +refs/heads/agri-farm-erpnext:refs/remotes/upstream/agri-farm-erpnext
	[remote "origin"]
  	      url =	https://github.com/<your github username>/erpnext 
  	      fetch = +refs/heads/agri-farm-erpnext:refs/remotes/origin/agri-farm-erpnext
  1. Perform a git fetch --all with your current working directory as frappe-bench/apps/erpnext
  2. Now execute this to checkout 2 new branches agri-farm-erpnext and origin_agri
git checkout -b agri-farm-erpnext --track upstream/agri-farm-erpnext
git checkout -b origin_agri --track origin/agri-farm-erpnext
  1. Do a git branch -vv
  2. Your current branch should be origin_agri

Make a pull Request !!

  1. Make your changes on this local branch + git add . + git commit -m "<your commit message>" + git push origin HEAD:agri-farm-erpnext
  2. You'll have pushed your changes to agri-farm-erpnext branch on your forked repository.
  3. Now visit https://github.com/<your github username>/erpnext/tree/agri-farm-erpnext
  4. Click on New Pull Request
  5. Now click on Create Pull Request!
Clone this wiki locally