I can’t upload files to the project on github

Asked

Viewed 1,923 times

2

I’m trying to put an html page on the air, but nothing happens and the git terminal error appears:

Everything up-to-date

Follow commands I used:

 cd Desktop/ 

 cd projeto-html/

 git init .

 git remote add origin https://github.com/GuigaPassos/GuigaPassos.github.io.git

 git pull origin master

 git add .

 git push origin master

After that appears:

Everything up-to-date

  • What are you trying to send? , git status to see the modifications, git add - All to add to the container and git commit -m "msg from commit"; to commit, then push

  • @Felipeduarte I’m trying to upload my "index.html" file and the updated "README"

2 answers

2


Before performing the push you need to perform a commit, do:

git commit -am 'Mensagem do commit'

The message Everything up-to-date indicates that your repository is up to date

  • Nothing has changed, I want to put my website on the air through github

  • Gives a git remote, which way out?

  • I give F5 on the Github page and nothing has changed

  • 1

    The files were not sent, do so: git add *; git commit -am 'Mensagem'; git push origin master

  • Got it, it worked, thank you very much!

0

How was your procedure?

You first created the repository on Github and made the clone?

Or created a directory on your machine and now wants to send to Github?

On Github, you checked the option to initialize the directory? or not?

The easiest way is:

  1. Create the repository on Github, check the option to create README.
  2. Make a git clone URL to your computer.
  3. Copy the files you want to upload to Git. (I think it’s important before committing to create a .gitignore. With this file you configures what you don’t want to send to the git server. As for examples temporary files on systems. With Maven in Java, i do not need to store the target folder for example. Projects made with Netbeans or other Ides I can choose not to save files from Project configuration that are created for the user’s machine. Here on this link has a lot of example, for projects in several languages.
  4. git commit -am "COMMIT MESSAGE"
  5. git push (ready files will be transferred to Git or Github)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.