I created a new repository to use shallow backup, and GitHub created the default branch as main.
When I attempt to push the backup to GitHub, it fails as it tries to configure the upstream branch as master which doesn't exist.
Pushing to master: git@github.com:oWretch/shallow_backup.git...
Traceback (most recent call last):
File "/opt/homebrew/bin/shallow-backup", line 33, in <module>
sys.exit(load_entry_point('shallow-backup==5.1', 'console_scripts', 'shallow-backup')())
File "/opt/homebrew/Cellar/shallow-backup/5.1/libexec/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/opt/homebrew/Cellar/shallow-backup/5.1/libexec/lib/python3.10/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/opt/homebrew/Cellar/shallow-backup/5.1/libexec/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/homebrew/Cellar/shallow-backup/5.1/libexec/lib/python3.10/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/opt/homebrew/Cellar/shallow-backup/5.1/libexec/lib/python3.10/site-packages/shallow_backup/__main__.py", line 132, in cli
git_add_all_commit_push(repo, "full_backup")
File "/opt/homebrew/Cellar/shallow-backup/5.1/libexec/lib/python3.10/site-packages/shallow_backup/git_wrapper.py", line 111, in git_add_all_commit_push
repo.git.push("--set-upstream", "origin", "master")
File "/opt/homebrew/Cellar/shallow-backup/5.1/libexec/lib/python3.10/site-packages/git/cmd.py", line 638, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/opt/homebrew/Cellar/shallow-backup/5.1/libexec/lib/python3.10/site-packages/git/cmd.py", line 1183, in _call_process
return self.execute(call, **exec_kwargs)
File "/opt/homebrew/Cellar/shallow-backup/5.1/libexec/lib/python3.10/site-packages/git/cmd.py", line 983, in execute
raise GitCommandError(redacted_command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
cmdline: git push --set-upstream origin master
stderr: 'error: src refspec master does not match any
error: failed to push some refs to 'github.com:oWretch/shallow_backup.git''
I created a new repository to use shallow backup, and GitHub created the default branch as
main
.When I attempt to push the backup to GitHub, it fails as it tries to configure the upstream branch as
master
which doesn't exist.