Skip to content

fix: cannot find remote branch #48

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

Conversation

alichherawalla
Copy link
Contributor

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.

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

Successfully merging this pull request may close these issues.

1 participant