repo-visualizer icon indicating copy to clipboard operation
repo-visualizer copied to clipboard

fix: cannot find remote branch

Open alichherawalla opened this issue 3 years ago • 2 comments

Hi,

Thank you for this amazing library! In terms of getting a fingerprint of the project and its structure, there is nothing that I have come across that is easier to use.

While running this action in one of my repos I faced the following issue which this PR resolves

/usr/bin/git rev-parse --verify <branch-name>
fatal: Needed a single revision

and there after pushing fails since it tries to push to a branch that already exists

  /usr/bin/git push --set-upstream origin <branch-name>
  To https://github.com/<org>/<repo-name>
   ! [rejected]        visualizer -> visualizer (non-fast-forward)
  error: failed to push some refs to 'https://github.com/<org>/<repo-name>'
  hint: Updates were rejected because the tip of your current branch is behind
  hint: its remote counterpart. Integrate the remote changes (e.g.
  hint: 'git pull ...') before pushing again.
  hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Changing to git switch with the --track flag solves the problem.

alichherawalla avatar Aug 20 '22 11:08 alichherawalla

This PR addresses and solves this issue

alichherawalla avatar Aug 20 '22 11:08 alichherawalla

@Wattenberger If possible please take a look at this PR

alichherawalla avatar Aug 20 '22 11:08 alichherawalla

possible to please get a review here?

alichherawalla avatar Sep 09 '22 09:09 alichherawalla