-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Live branch is synchronized with remote target branch to allow for pushing without force #1209
Comments
When merging via pull request, you need to make sure to use the Merge pull request button. Otherwise, the two branches won't have a common commit history anymore, which prevents further merges. A drawback is that many internal commits to workspace stay visible (see below for an example) but currently there is no way to work around it.
|
After several discussions, we came to the end that we actually need a slightly different behavior: to make sure that we can push to the target repo without force, live and target branches should be synchronized (i.e., live should be reset to target) on startup. Merging from source needs to be the same as before, to allow for diverging source and target repos. I will adjust the issue title accordingly. |
…to allow for pushing without force (#1210)
Use Case
I want to use the Git config staging as a backup for a development config server. It should use the same repository and branch for pulling and pushing. I then want to merge the state of this branch into another one using a pull request. This second branch serves as source for further config server stages, e.g., prod.
The config servers are deployed in Kubernetes, i.e., may frequently restart and/or be removed and re-created.
Problem
The development config server fetches changes from the source branch into workspace, then merges these changes into live, which is then pushed to the source branch. This can destroy a clean commit history, disallowing for rebase.
Suggested Solution
When fetching from the source branch, always rebase live on the source branch and then merge the changes into workspace. This will retain the commit history and add changes only on top.
Side Note
The remote repo will still contain commits from workspace, like "Commit configuration file and agent mapping changes". These are required, as the config server needs to know which workspace changes have been merged into which commit on the live branch.
The text was updated successfully, but these errors were encountered: