Skip to content

Conversation

@carlosfg-flu
Copy link

@carlosfg-flu carlosfg-flu commented Sep 1, 2025

This is an scenario where GUW sync command raises some git conflicts that
are avoidable:

* 0632076 (HEAD -> A) foo
| * b1ac2a0 (B) bar
| * fd1dd3f foo
|/
* 5ccd4f9 (main, final) init

In this scenario the branch A was rebased, hypothetically because a
reviewed asked for a change. Then, when we try to "sync" with GUW, it
launches the command:

git rebase origin/A B --onto=final

The range "origin/A..B" is wrong, the correct one should be "B~..B" because
it includes only the commits within the "B" branch. This command
doesn't raises conflicts and gives the expected result:

git rebase B~ B --onto=final

@carlosfg-flu carlosfg-flu requested a review from turran September 1, 2025 12:46
This is an scenario where GUW sync command raises some git conflicts that
are avoidable:

	* 0632076 (HEAD -> A) foo
	| * b1ac2a0 (B) bar
	| * fd1dd3f foo
	|/
	* 5ccd4f9 (main, final) init

In this scenario the branch A was rebased, hypothetically because a
reviewed asked for a change. Then, when we try to "sync" with GUW, it
launches the command:

	git rebase origin/A B --onto=final

The range "origin/A..B" is wrong, the correct one should be "B~..B" because
it includes **only** the commits within the "B" branch. This command
doesn't raises conflicts and gives the expected result:

	git rebase B~ B --onto=final
@carlosfg-flu carlosfg-flu force-pushed the test_sync_with_conflicts branch from c3c7f83 to 3e678a0 Compare September 1, 2025 14:25
@carlosfg-flu
Copy link
Author

When a feature, let's say feature1, enters into reviewing mode due to a merge request,
feature1 will not be sent upstream but a new branch called feature1-reviewing.

gitGraph TB:
  commit
  commit
  branch feature1
  commit
Loading

So this scenario won't be possible if the workflow is followed correctly.

PS: We might want to use this way of testing, with a locally generated git repo, instead of polluting the GUW official repository with testing inmortal branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants