I had a local git project that I wanted to add to gitolite. Apparently this is hard so I abandoned the idea. I created a new gitolite repo by adding it to gitolite-admin/conf/gi
No "main" exists yet on the remote (origin) repository.
git push origin main
After this first push you can use the simpler
git push
Edit: With the recent trends my answer has been update to replace "master" with "main"
If you're using git to mirror then use this :
git config remote.backup.mirror true
your master branch might be upstream and needs to be unset On branch master
Your branch is based on 'origin/master', but the upstream is gone.
(use git branch --unset-upstream
to fix)
Your local and remote repositories do not share the same history, since you recreated the repo. Therefore, Git won't let you push this content.
If you are not afraid of losing the content that is on the remote repository, you can force push : git push -f
.