Create a Github/ git repository

Asked

Viewed 106 times

-1

I’m trying to create a repository of github, but something is going wrong and I can’t identify what:

I’m using:

  • windows 10 //
  • git version 2.22.0.windows//
  • Node V10.16.0 //
  • Browser
  • Sync v2.26.7 //
  • sublime text 3 //

The steps I’m following - on github:

create a new repository ---
name it ---
settings> github pages> master blanch ----
back to the main and copy the link

In the terminal:

git clone <LINK> ----
cd <NAME OF THE REPOSITORY> ----
dir

In the sublime:

After I create the file index.html and saved in the folder, I give the command 'git status' and the terminal does not show the index file created, the msg appears:

"On branch master Your branch is up to date with 'origin/master'.
 nothing to commit, working tree clean"

I’ve checked a few times and I don’t understand what’s going wrong..

  • 3

    If the file is new, you need to add with git add index.html. And then commit the file, push, etc...

  • Or you can add it all at once with the git add .

1 answer

1

Apparently his branch has nothing, so you should add something to your stage. So with the commands below you can add items to your Github.

with the command:

git add . 

or can specify with the file name with command:

git add arquivo.js 

subsequently

git commit -m "initial commit"

can confirm your Stage

 git status 

and finally push them into the origin masterwith

 git push origin master ou 

 ou 

 git push
  • ah yes! I still got a little confused about some things, but apparently it all worked out for now. Thank you so much!

  • good, if possible avoid leaving questions open mark

Browser other questions tagged

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