git-town icon indicating copy to clipboard operation
git-town copied to clipboard

disallow shipping feature branches with remotes in offline mode

Open kevgo opened this issue 7 years ago • 0 comments
trafficstars

When working in offline mode I want to be prevented from accidentally shipping branches with remotes So that my remote branches are cleaned up when shipping when I am online again

  • when in offline mode, git ship aborts with an error message if the branch is known to have a remote
Scenario: shipping a feature branch with remotes in offline mode
  Given my repository has a feature branch named "feature"
  And the following commit exists in my repository
    | BRANCH  | LOCATION         | MESSAGE        | FILE NAME    | FILE CONTENT    |
    | feature | local and remote | feature commit | feature_file | feature content |
  And I am on the "feature" branch
  And Git Town is in offline mode
  When I run `git-town ship -m "feature done"`
  Then it runs no commands
  And it prints the error "Cannot ship branches with remotes in offline mode."

kevgo avatar Nov 18 '18 15:11 kevgo