How can i upload my windows files to an already existing project in Github?

Viewed 26

I had a project in Windows without any git setup.I just want to upload my files to an already existing remote repository but don't want to clone the repository and move my files to that repository but uploading my files from my directory to a remote repository

The github repository has two branches, one is named main. i installed Git app, went to the path of my folder in bash and used the commands :

git init
git add .
git commit -m "First commit"
git remote add origin pathtogithub
git push origin master

Started uploading but gave me an error in the end and didn't upload anything actually, i got the error

! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://github.com/ettspa/sebenico-unity-submarinegame'

I realized the name of the branch is named main, not master, tried to use git remote add origin main but gives me the error "error: remote origin already exists."

I get also the errors

remote: error: GH001: Large files detected. You may want to try Git Large File Storage.

Maybe just fails cause files are too large, and in that case how can be solved?

0 Answers
Related