Q:

Detaching ERPNext or any frappe app from source git repository

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 update

While 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. 

A:

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.here

And than i run the following command to check the remote version for erpnext-
git remote -v

It shows following output-
origin  https://github.com/my_git_user_name/REPOSITORY.git (fetch)
origin  https://github.com/my_git_user_name/REPOSITORY.git (push)
upstream  https://github.com/frappe/bench.git (fetch)
upstream  https://github.com/frappe/bench.git (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 upstream

And than set new upstream towards my repo-
git remote add upstream https://github.com/my_git_user_name/REPOSITORY.git

Than i have gone to bench-repo folder via terminal and run the following command to migrate the changes-
bench migrate

Now 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. 