Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improvement] Add ability to discard changes when switching branches. #87

Open
WatchTh1 opened this issue Mar 5, 2019 · 4 comments
Open

Comments

@WatchTh1
Copy link

WatchTh1 commented Mar 5, 2019

Use case Switching branches

Prepequisites

Archi has model repository connected
Repository has more than one branch
Changes has been made to branch

Problem

There are no way to discard changes been made to model if they are unwanted.
Feature "Restore to this commit" is unavailable for the last commit in "Change History".
Pull repository requires to make a commit if changes to model has been made.
If there are conflicts additional commits has to be made and then merged and so it spoils commit history or additional actions has to be made to revert branch to earlier commits.

User actions

  1. Select Branch in branches workspace to switch into
  2. Select "Switch to branch"
  3. Choice of action dialog is displayed
  4. User selects action
  5. Selected action is performed.

Current behaviour

At step 3 a dialog is displayed with buttons: "Save", "Cancel"
Option "Save": saves the changes to model and calls "Commit dialog", after commit is made branch is switched to target branch.
If commit is canceled - git branch left unchanged.

Option "Cancel" cancels the dialog

Proposed behaviour

At step 3 dialog options should be: "Save and commmit", "Reset and switch", "Cancel" is displayed.

Option "Save and commmit": Saves model and displays "Commit" dialog window. After commit is made branch is switched to targeted branch. If commit is canceled

Option "Reset and switch": Displays warning dialog:

  -  "This will reset branch to the last commit been made! Are you sure?" -  with options: "Continue", "Cancel".
  - "Continue" button reverts all changes been made to model to the last commit and branch is switches to target branch selected.
 -  Option "Cancel" cancels the dialog, git branch left unchanged.

Option "Cancel" of main dialog cancels the branch switching.

@Phillipus
Copy link
Member

You can use the "Abort Uncommitted Changes" option?

@WatchTh1
Copy link
Author

WatchTh1 commented Mar 5, 2019 via email

@Phillipus
Copy link
Member

Perhaps this is something that could be looked at in the future.

@Phillipus
Copy link
Member

This is being worked on and will be in a future release.

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

No branches or pull requests

2 participants