Replies: 3 comments
-
My approach is to switch to a new local branch, such as local-dev, modify the changes I need in this branch, and then use docker-compose under this branch to deploy. When dify is updated, execute git rebase upstream/main under the local-dev branch. In this way, the updates of dify can be pulled into local-dev. If dify does not make changes to docker compose, there will generally be no conflict. My complete steps are as follows:
hope this helps you |
Beta Was this translation helpful? Give feedback.
-
I think the simplest way is to use the
I use this flow to upgrade from 0.6.6 to 0.6.7, it`s works fine. |
Beta Was this translation helpful? Give feedback.
-
You can use this script: #!/bin/bash
# 设置仓库的路径。请根据实际情况修改这个路径。
REPO_PATH="./dify"
# 进入仓库目录
cd "$REPO_PATH" || { echo "Repository path '$REPO_PATH' not found."; exit 1; }
# 检查是否存在未提交的更改
if [[ $(git status --porcelain) ]]; then
# 暂存当前工作目录中的所有更改
git stash push -u -m "Local changes before update $(date +%Y-%m-%d:%H:%M:%S)"
STASH_APPLIED=1
else
echo "No local changes to stash."
fi
# 拉取最新的代码,并尝试自动合并
git pull --rebase
# 如果之前有暂存过更改,则尝试重新应用它们
if [ "$STASH_APPLIED" == "1" ]; then
# 应用之前暂存的更改
if git stash pop; then
echo "Successfully reapplied your local changes."
else
echo "There were conflicts when reapplying your local changes."
exit 1
fi
fi
echo "Repository has been updated." After modifying |
Beta Was this translation helpful? Give feedback.
-
I need connect dify to my notion workspace, so I change the environment in docker compose file, but I wanna keep dify up to date as well, when I use like 'git pull' to sync code with main repo, everything was overwritten, so what's best practice can do that?
Beta Was this translation helpful? Give feedback.
All reactions