Help pushing my customized erpnext to git

Hi All ,

I finished my project , I have made certain modifications to standard erpnext modules now I am trying to push my customized erpnext to my repo in github , but I am getting the following message , please guide me

ommi@ommi:~/frappe-bench/apps/erpnext$ git commit -m "first commit"
On branch develop
Your branch is up-to-date with 'upstream/develop'.

Changes not staged for commit:
	modified:   erpnext/accounts/doctype/asset/asset.json
	modified:   erpnext/accounts/doctype/pricing_rule/pricing_rule.json
	modified:   erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json
	modified:   erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
	modified:   erpnext/buying/doctype/purchase_order/purchase_order.json
	modified:   erpnext/buying/doctype/purchase_order_item/purchase_order_item.json
	modified:   erpnext/buying/doctype/quality_inspection/quality_inspection.json
	modified:   erpnext/buying/doctype/request_for_quotation_item/request_for_quotation_item.json
	modified:   erpnext/buying/doctype/supplier/supplier.json
	modified:   erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json
	modified:   erpnext/crm/doctype/opportunity_item/opportunity_item.json
	modified:   erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.json
	modified:   erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.json
	modified:   erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.json
	modified:   erpnext/manufacturing/doctype/bom/bom.json
	modified:   erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.json
	modified:   erpnext/manufacturing/doctype/bom_item/bom_item.json
	modified:   erpnext/manufacturing/doctype/production_order/production_order.json
	modified:   erpnext/manufacturing/doctype/production_order_item/production_order_item.json
	modified:   erpnext/manufacturing/doctype/production_plan_item/production_plan_item.json
	modified:   erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.json
	modified:   erpnext/portal/doctype/homepage_featured_product/homepage_featured_product.json
	modified:   erpnext/projects/doctype/timesheet_detail/timesheet_detail.json
	modified:   erpnext/public/css/erpnext.css
	modified:   erpnext/selling/doctype/customer/customer.json
	modified:   erpnext/selling/doctype/installation_note_item/installation_note_item.json
	modified:   erpnext/selling/doctype/product_bundle/product_bundle.json
	modified:   erpnext/selling/doctype/product_bundle_item/product_bundle_item.json
	modified:   erpnext/selling/doctype/quotation_item/quotation_item.json
	modified:   erpnext/selling/doctype/sales_order_item/sales_order_item.json
	modified:   erpnext/stock/doctype/batch/batch.json
	modified:   erpnext/stock/doctype/bin/bin.json
	modified:   erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
	modified:   erpnext/stock/doctype/item/item.js
	modified:   erpnext/stock/doctype/item/item.json
	modified:   erpnext/stock/doctype/item/item.py
	modified:   erpnext/stock/doctype/item/item_list.js
	modified:   erpnext/stock/doctype/item/test_item.py
	modified:   erpnext/stock/doctype/item_price/item_price.json
	modified:   erpnext/stock/doctype/landed_cost_item/landed_cost_item.json
	modified:   erpnext/stock/doctype/material_request_item/material_request_item.json
	modified:   erpnext/stock/doctype/packed_item/packed_item.json
	modified:   erpnext/stock/doctype/packing_slip_item/packing_slip_item.json
	modified:   erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
	modified:   erpnext/stock/doctype/serial_no/serial_no.json
	modified:   erpnext/stock/doctype/stock_entry/stock_entry.js
	modified:   erpnext/stock/doctype/stock_entry/stock_entry.json
	modified:   erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json
	modified:   erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json
	modified:   erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.json
	modified:   erpnext/support/doctype/warranty_claim/warranty_claim.json

Untracked files:
	erpnext/projects/doctype/ci/
	erpnext/projects/doctype/cl/
	erpnext/projects/doctype/fi/
	erpnext/projects/doctype/fl/
	erpnext/projects/doctype/grnmachining/
	erpnext/projects/doctype/htgrn/
	erpnext/projects/doctype/hti/
	erpnext/projects/doctype/mi/
	erpnext/public/css/erpnext.css~
	erpnext/stock/doctype/heat/
	erpnext/stock/doctype/item/item.json~
	erpnext/stock/doctype/item/item_list.js~
	erpnext/stock/doctype/mill/
	erpnext/stock/doctype/stock_entry/stock_entry.js~

no changes added to commit

Thanks

You need to add the changes before you can commit them.

1 Like

Hi @Ben_Cornwell_Mott ,

Thanks for the reply , I read the contents in the above link and added my files and commited , now it is showing this error , what should I do

ommi@ommi:~/frappe-bench/apps/erpnext$ git push upstream master
Username for 'https://github.com': srinivasragav
Password for 'https://srinivasragav@github.com': 
remote: Permission to frappe/erpnext.git denied to srinivasragav.
fatal: unable to access 'https://github.com/frappe/erpnext/': The requested URL returned error: 403

Please guide me .

Thanks

Are you sure you followed the steps correctly given in the document? Because you are pushing to the master not to your branch. Try step by step again.

1 Like

Many thanks for reply @KanchanChauhan . Yes I tried again , same error . I tried pushing my own custom app , it was successful but I am not able to push erpnext app .

Please help

You mean you want to contribute to the erpnext core code?

1 Like

@KanchanChauhan . Thanks for quick reply , yes I have customized erpnext standard modules to my requirement and I am trying to push my customized erpnext to my repo .

Can you share the full commands what you are doing and which is your git repository?

1 Like

Iā€™m not much familiar with git but this might help.what are you trying to do here is to push it to the master repo not yours thats why you getting access not allowed error.
1- add your changed files
either select which files you wanna add
git add [file_name]
or add them all
git add .
2- commit your changes
git commit -m "message"
3-then create remote branch for your local branch
git push origin <branch-name>
4- push your changes to your remote branch
git push -u origin <your_branch>

1 Like

Many thanks for the reply @KanchanChauhan .

List of commands I ran

git init
git add README.md
git add . 
git commit -m "first commit"
git remote add upsteam https://github.com/srinivasragav/erpnext.git
git push upstream master

My Github repo https://github.com/srinivasragav/erpnext

Hi @ganas . Thanks for reply I tried and got this error

ommi@ommi:~/frappe-bench/apps/erpnext$ git push upstream master
fatal: 'https/github.com/erpnext' does not appear to be a git repository
fatal: Could not read from remote repository.

Please help

try
git push -u origin upstream

also what do you get when u do
git status

1 Like

Did you fork frappe and erpnext?

Thanks for the support @ganas

I am getting this error

ommi@ommi:~/frappe-bench/apps/erpnext$ git push -u origin upstream
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
ommi@ommi:~/frappe-bench/apps/erpnext$ 

Running git status yielded

ommi@ommi:~/frappe-bench/apps/erpnext$ git status
On branch develop
Your branch is ahead of 'upstream/develop' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working directory clean
ommi@ommi:~/frappe-bench/apps/erpnext$ 

Please help

Thanks

Hi @Ninja,

Share the output of below command
git remote -v

1 Like

Hi @rohit_w Thanks for reply ,

Here is the output

ommi@ommi:~/frappe-bench/apps/erpnext$ git remote -v
upsteam	https://github.com/srinivasragav/erpnext.git (fetch)
upsteam	https://github.com/srinivasragav/erpnext.git (push)
upstream	https/github.com/erpnext (fetch)
upstream	https/github.com/erpnext (push)
ommi@ommi:~/frappe-bench/apps/erpnext$ 

Please help

Thanks

Hi @KanchanChauhan , @ganas , @rohit_w

I deleted my old repo and created a new repo in the name erp and then I tried the below command and getting this error message , please guide

  ommi@ommi:~/frappe-bench/apps/erpnext$ git init
Reinitialized existing Git repository in /home/ommi/frappe-bench/apps/erpnext/.git/
ommi@ommi:~/frappe-bench/apps/erpnext$ git add README.mdommi@ommi:~/frappe-bench/apps/erpnext$ git commit -m "fourth commit"
On branch develop
Your branch is ahead of 'upstream/develop' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working directory clean
ommi@ommi:~/frappe-bench/apps/erpnext$ git remote add upsteam https://github.com/srinivasragav/erp.git
fatal: remote upsteam already exists.
ommi@ommi:~/frappe-bench/apps/erpnext$ git remote -v
upsteam	https://github.com/srinivasragav/erpnext.git (fetch)
upsteam	https://github.com/srinivasragav/erpnext.git (push)
upstream	https/github.com/erpnext (fetch)
upstream	https/github.com/erpnext (push)
ommi@ommi:~/frappe-bench/apps/erpnext$ git remote set-url origin https://github.com/srinivasragav/erp.git
fatal: No such remote 'origin'

Thanks

Hi @ganas , @rohit_w and @KanchanChauhan ,

I followed the instructions in the http://stackoverflow.com/questions/25503017/why-does-git-tell-me-no-such-remote-origin-when-i-try-to-push-to-origin and did that , finally I am encountering with a different error ,please guide

ommi@ommi:~/frappe-bench/apps/erpnext$ git push -u origin master
Username for 'https://github.com': srinivasragav
Password for 'https://srinivasragav@github.com': 
error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/srinivasragav/erp.git'
ommi@ommi:~/frappe-bench/apps/erpnext$ 

Thanks

Hi @ganas , @rohit_w and @KanchanChauhan . Many thanks for the help , this post solved my issue I was bit reluctant googling my issue , sorry for that .

Thanks a lot for the help . Please close this thread

1 Like