Detaching ERPNext or any frappe app from source git repository
Emily Wong
At first, i am not refering to the original stackoverflow frappe tag. I am talking about this frappe.
Normally frappe or ERPNext(a frappe app) is installed via frappe-bench, and update the installed app via this command-
bench updateWhile updating, it fetches data from official frappe git repo.
Now what i want to do is detach ERPNext or any frappe app from source repository so that when i run bench update, it only take updates from the changes i have made in the source code, not from the github repo.
1 Answer
I have done the following steps to detach a frappe app (in my case ERPNext) from source repository-
At first, i have moved to frappe-bench/apps/erpnext via terminal and than set remote url for that app towards a private repo i have made, by
git remote set-url origin git://my-repo.url.hereAnd than i run the following command to check the remote version for erpnext-
git remote -vIt shows following output-
origin (fetch)
origin (push)
upstream (fetch)
upstream (push)That means, though i set my apps remote url towards my own repo, bench update command will still update the app from upstream, in my case, frappe/bench.
So i have first removed the upstream-
git remote rm upstreamAnd than set new upstream towards my repo-
git remote add upstream Than i have gone to bench-repo folder via terminal and run the following command to migrate the changes-
bench migrateNow if i run bench update, i see that my app is updating from my private repo. (Though, bench will update from official repo)
These steps can be done for any frappe app.