How to commit files to my repo?

Hi there,

I’d like to send files from my desktop to repository on buddy. I have already used “git commit” command in many different configurations but it didn’t work.

Any ideas how to resolve my problem ?

Hi @Hilario :slight_smile:

Just make a list of all commands you’ve used to make the commit.
It’ll be much easier to understand what went wrong and where the mistake is.

Regards,
Octavia

Thanks for fast reply :+1:

Here you go:

  • to create my local repository I’ve used git init in my folder.

  • git commit -m ‘adding files to repo’

  • finally git push origin master. Unfortunately it didn’t work as well

Please help!

@Hilario,

Seems like you forgot about git add.

Every time you want to commit a file to Git repo, Git needs to know that this particular file should be included in the next commit. Here’s how to do it:

git add filename

Then commit:

git commit -m 'my commit message'

Hope it make things work! :slight_smile:

Worked, thanks!