repo-visualizer
repo-visualizer copied to clipboard
Fails to verify if branch exists or not & then fails to push because branch exists on remote.
Environment: This is run inside a docker container.
It seems the action fails to verify if a branch exists or not:
/usr/bin/git fetch
/usr/bin/git rev-parse --verify project-tree
fatal: Needed a single revision
Branch project-tree does not yet exist, creating project-tree.
/usr/bin/git checkout -b project-tree
Switched to a new branch 'project-tree'
In the above case, it says that project-tree doesn't exist, when it exists on remote. Furthermore, this matters because it later fails to push as the branch already exists on remote and the local history isn't updated:
[project-tree REDACTED] Update Project Tree (REDACTED).
1 file changed, 1 insertion(+)
create mode 100644 diagram.svg
/usr/bin/git push --set-upstream origin project-tree
To REDACTED
! [rejected] project-tree -> project-tree (non-fast-forward)
error: failed to push some refs to 'REDACTED'
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.
Hi, I have submitted a fix PR.
Until it is accepted you can use my fork uses: pohy/repo-visualizer@main
Thank you very much @pohy!
this should be fixed - please shout if you're still seeing this behavior. sorry about the delay!