Nikki beeeeeeeeeez
Nikki beeeeeeeeeez

Reputation: 63

How to add files to your repository on github?

I'm new to Github, and I'm having issues using it. I created a repository, but I have no idea how to add files to the repository. How do I go about doing this?

Also, I have a PC if that helps.

Thanks:)

Upvotes: 0

Views: 3334

Answers (2)

Ifeoluwa Osungade
Ifeoluwa Osungade

Reputation: 305

Navigate to your git directory...

Type git status

Git status shows the list of modified files...

The list has a green foreground color if it as been added but yet to be committed and a red foreground colour if it is yet to be added..

Type git add filename

To add a single file

And

Type git add *

To add all the edited files

Type git commit - m "commit message"

Type git push origin develop

To upload...

This link will help you JumpStart git http://rogerdudler.github.io/git-guide/

Upvotes: 1

Eric
Eric

Reputation: 244

Open the Git Bash shell on Windows. Then do the following to add files and commit files. The first command adds all files. If you just want to add one file, use $ git add .

$ git add .

$ git commit -m 'First commit'

https://help.github.com/articles/adding-a-file-to-a-repository-from-the-command-line/

Hope this helps.

Upvotes: 1

Related Questions