Your repository is empty. You must first initialize it on your local machine, and only then can you do it push
. The procedures are as follows::
Creation of local repository:
> cd C:\Users\Nikolai\Desktop\exercicios-c
> git init
Then add any file, it can be source code, text, image. Anyone. It is normal to have a "Contributors.txt" file in the repository, with the names of the development members.
> echo "Nikolai Cinotti" > contributors.txt
Add the file to the repository and commit:
> git add contributors.txt
> git commit -m "Primeiro commit!"
Send to remote server:
> git remote add origin https://github.com/NikolaiCinotti/exercicios-c.git
> git push -u origin master
By using Windows, the syntax of the commands may have some changes that I do not know because the Windows terminal is more limited than Bash.
Correction: had typed the command git push
wrong. Note that the second parameter is -u
, and not -i
as I had typed.
Make sure you’re in the right project folder when you try to open the branch.
– Vanessa Martins