Can anyone explain the structure of Git with GitHub?

1

I'm trying to configure Git with GitHub, but I'm not getting anyone can help me with this? Windows 10 operating system.

Example: I use Eclipse and my projects are created in the default directory C: \ Users \ Diego \ workspace \ on my local machine, my repository created in the GitHub site is the Projects name, how should I proceed to get Git set up, upload my projects to Github, and I would also like to know if you can upload the projects already created.

    
asked by anonymous 09.06.2017 / 20:00

1 answer

3
  

Example: I use Eclipse and my projects are created in the directory   default C: \ Users \ Diego \ workspace \ on my local machine, my   repository created in the GitHub site is the Projects name, as I should   proceed to get Git ..

clone the repository with the following command:

$ cd C:\Users\Diego\workspace\Pasta-do-Projeto
$ git clone url-do-repositorio

At this point you already have your local repository pointing to the project in github

  

... and I would also like to know if you can upload the already created   also.

create the repository in github corresponding to your local project, once created, copy the url of the project. Access the project folder from the terminal and use the following commands

$ cd C:\Users\Diego\workspace\Pasta-do-Projeto
$ git init
$ git remote add origin https://github.com/usuario/nomedoprojeto.git
$ git add -A 
$ git commit -m "meu primeiro upload"
$ git push origin master

useful link:

09.06.2017 / 20:37