从源git存储库中分离ERPNext或任何frappe应用程序

时间:2015-12-01 07:09:13

标签: git github frappe

首先,我没有引用原始的stackoverflow frappe 标记。我在谈论这个frappe

通常 frappe ERPNext (frappe app)通过frappe-bench安装,并通过此命令更新已安装的应用程序 -

bench update

更新时,它会从官方frappe git repo中获取数据。

现在我要做的是从源存储库中分离ERPNext或任何frappe应用程序,这样当我运行 bench update 时,它只会从我在源代码中所做的更改中获取更新,而不是来自github repo。

1 个答案:

答案 0 :(得分:4)

我已完成以下步骤从源存储库中分离frappe应用程序(在我的情况下 ERPNext ) -

首先,我已经通过终端转移到 frappe-bench / apps / erpnext ,然后将该应用的远程网址设置为我已制作的私人仓库

git remote set-url origin git://my-repo.url.here

然后我运行以下命令来检查erpnext的远程版本 -

git remote -v

显示以下输出 -

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)

这意味着,虽然我将我的应用程序远程网址设置为我自己的仓库,替换更新命令仍将从上游更新应用程序,在我的情况下,{{3 }}

所以我先删除了上游 -

git remote rm upstream

而不是将新上游设置为我的回购 -

git remote add upstream https://github.com/my_git_user_name/REPOSITORY.git

我已经通过终端转到 bench-repo 文件夹并运行以下命令来迁移更改 -

bench migrate

现在,如果我运行替换更新,我会看到我的应用正在从我的私人仓库进行更新。 (虽然,替补席将从官方回购更新)

可以为任何frappe应用程序执行这些步骤。