How does one create Pull/Merge Requests that have a complete git history? #5781
-
|
We ran into an issue, similar to this one, today while working with one of our git repos: #2692 The workflow we're trying to implement is for updating values in a helm chart we control:
We use Gitlab so Merge Request = Pull Request. Steps 1 through 4 didn't work because the new branch is orphaned and empty, so we tried using Even after reading through the linked discussion, I'm struggling to understand what the purpose of the orphaned branch strategy is and why someone would use it, and why there would be options for creating branches, pushing to them, and opening merge requests if history is not preserved? It just results in merge requests that are un-mergeable because of the history discrepancy. Maybe our setup is just not compatible with Kargo since we do not use long-running branches in our gitops strategy? Any insight would be appreciated. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
The discussion you linked to is pre-GA. The Kargo of today is virtually unrecognizable in comparison to what it was then, so you can dismiss that thread entirely. If I understand your desired workflow correctly, what you want is to check out a branch tracking an existing remote branch (let's say In the shell, something like this: git checkout main
git pull origin main
# make changes
git add .
git commit -m "my changes"
git push origin main:new-branch # Will have common history with main
# open pr with new-branch as the source branch and main as the targetAs Kargo steps: |
Beta Was this translation helpful? Give feedback.
The discussion you linked to is pre-GA. The Kargo of today is virtually unrecognizable in comparison to what it was then, so you can dismiss that thread entirely.
If I understand your desired workflow correctly, what you want is to check out a branch tracking an existing remote branch (let's say
main), make some modifications, commit, then push that to a new remote branch with common history withmainso you can create a PR.In the shell, something like this:
As …