You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bit uses the .bitmap file to sync workspaces between developers. The file can be modified in any workspace. This can cause merge conflicts in git.
If such conflict is not resolved properly it can cause critical issues and forces manual modifications to the bitmap file. As bitmap is autogenerated and should only manage by Bit, we should reduce the possibility of merge conflicts.
At the moment, The content of the file is not sorted, which makes it even more likely to create conflicts. I suggest that Bit should keep the .bitmap sorted alphabetically, in ascending order:
Sort components by their ID.
Sort tracked files (per component) by relativePath.
When the bitmap file is not sorted, each workspace can potentially have its own unique order of components/files. In Bit it's irrelevant, but Git handles the contents of the files, so the order of the lines is important. I think that if we keep bitmap sorted it'll be less likely to cause merge conflicts that Git is unable to resolve automatically.
So when Bit writes content to bitmap, it should just make sure that it writes it after the sort. This way it's backward compatible. Additionally, it will only happen for actions that the user expects that'll cause modifications to the bitmap file.
The text was updated successfully, but these errors were encountered:
Part 1 (Sort components by their ID) has been implemented in the commit above.
Part 2 (Sort tracked files) was implemented a while ago.
I added e2e-tests for both parts.
Bit uses the
.bitmap
file to sync workspaces between developers. The file can be modified in any workspace. This can cause merge conflicts in git.If such conflict is not resolved properly it can cause critical issues and forces manual modifications to the
bitmap
file. Asbitmap
is autogenerated and should only manage by Bit, we should reduce the possibility of merge conflicts.At the moment, The content of the file is not sorted, which makes it even more likely to create conflicts. I suggest that Bit should keep the
.bitmap
sorted alphabetically, in ascending order:relativePath
.When the
bitmap
file is not sorted, each workspace can potentially have its own unique order of components/files. In Bit it's irrelevant, but Git handles the contents of the files, so the order of the lines is important. I think that if we keepbitmap
sorted it'll be less likely to cause merge conflicts that Git is unable to resolve automatically.So when Bit writes content to
bitmap
, it should just make sure that it writes it after the sort. This way it's backward compatible. Additionally, it will only happen for actions that the user expects that'll cause modifications to thebitmap
file.The text was updated successfully, but these errors were encountered: