Possible bug when reverting a branch to an older commit (and a small Git Branch Manager suggestion)
Posted: Thu Jul 15, 2021 1:19 am
Hi there,
I've been playing around with the Git connector and I think I may have found an issue when trying to revert a branch in the Git History/Staging views. Here's how to reproduce:
1. Make sure the local and remote branches are in sync and that there are at least two commits on the remote and local branches.
2. Reset a branch to the second to last commit in the Git History view.
The local branch history is updated.
The application doesn't allow you to push the update back to the remote branch. Instead, the Git Staging view prompts you to pull down the commit you just reversed. I think oXygen is assuming that the commit history on the remote is correct, even though you intentionally reset the branch locally.
---
Also, for my suggestion to the Git Branch Manager: I would love a warning message that pops up when I have uncommitted changes on a branch and then attempt to switch branches. People who do this intentionally may choose to ignore the message, but absent-minded people (like me) could use that as a cue to go back and deal with uncommitted changes.
I made changes in one branch and didn't commit them (I left changes unstaged and I left changes in the staging area), the system let me switch branches. When I switched, those uncommitted changes moved to the new branch, so I nearly committed those changes to the wrong place. For the record, other Git clients exhibit the same behavior as the Git connector does now, but I would appreciate a warning message.
Thank you very much!
Micaela
I've been playing around with the Git connector and I think I may have found an issue when trying to revert a branch in the Git History/Staging views. Here's how to reproduce:
1. Make sure the local and remote branches are in sync and that there are at least two commits on the remote and local branches.
2. Reset a branch to the second to last commit in the Git History view.
The local branch history is updated.
The application doesn't allow you to push the update back to the remote branch. Instead, the Git Staging view prompts you to pull down the commit you just reversed. I think oXygen is assuming that the commit history on the remote is correct, even though you intentionally reset the branch locally.
---
Also, for my suggestion to the Git Branch Manager: I would love a warning message that pops up when I have uncommitted changes on a branch and then attempt to switch branches. People who do this intentionally may choose to ignore the message, but absent-minded people (like me) could use that as a cue to go back and deal with uncommitted changes.
I made changes in one branch and didn't commit them (I left changes unstaged and I left changes in the staging area), the system let me switch branches. When I switched, those uncommitted changes moved to the new branch, so I nearly committed those changes to the wrong place. For the record, other Git clients exhibit the same behavior as the Git connector does now, but I would appreciate a warning message.
Thank you very much!
Micaela