Hi @villelmo,
It seems like you're trying to push changes to a branch named "main" that does not exist in your local git repository or in the remote repository.
list your remote branches
git branch -a
if you find the repo try
git push origin HEAD:main
This will push your changes to the default branch named "main" in the remote repository.
If there is no branch main, then need to create it,
git checkout -b main
Then add and commit, following with push
git add . git commit -m "commit message"
git checkout main
fatal: A branch named 'main' already exists.
Get the same problem
git push origin master:master main:main
fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
main * master remotes/pb/main remotes/pb/master
it should go something like this
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi @villelmo,
It seems like you're trying to push changes to a branch named "main" that does not exist in your local git repository or in the remote repository.
list your remote branches
if you find the repo try
This will push your changes to the default branch named "main" in the remote repository.
If there is no branch main, then need to create it,
Then add and commit, following with push
Get the same problem
Please make sure you have the correct access rights
and the repository exists.
it should go something like this