seachicken / gh-poi

✨ Safely clean up your local branches
https://dev.to/seachicken/safely-clean-up-your-local-branches-9i3
MIT License
642 stars 17 forks source link

Error if detached head branch is present #44

Closed seachicken closed 2 years ago

seachicken commented 2 years ago

Describe the bug

  1. git clone git@github.com:seachicken/can.git
  2. cd can
  3. git checkout 47a4d97
  4. gh poi
  5. Output:
    ✕ Fetching pull requests...
    failed to run external command: git
    fatal: ambiguous argument '(HEAD detached at 47a4d97)': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'

Your Environment