How to configure github in ubuntu?

2

Now that I've finished my final project at C and delivered it at the end of this first semester.

I'm trying to set up and post my project on github .

I followed a video lesson and got configurar a repositório on my notebook. But I can not upload the file to the same folder .

Before that, without following video lesson , I had already created a repositório , but only on the site, no folder on my notebook.

Now, my github has two repositories and no project.

One call Linguagem-C , where at startup I would just post my programs in C. And one called projetosfinaisfaculdade , where I would post all the end of college semester projects. Now, do not even erase those I get.

I've tried several tutorials but I can not.

Can anyone tell me how to configure github in ubuntu?

In my case, I wanted to delete these two that I have first and then set up only one master in the correct way and put all the projects inside a single folder.

If someone needs to see the repositories in my profile, you are here: link

Thank you in advance. ;)

    
asked by anonymous 17.12.2015 / 22:51

1 answer

4

By following these steps, it is very easy to create and commit files in a remote repository.

Creating the project folder, enter it in the command line, type git init for git to recognize your folder as a repository.

After creating the remote repository by github , for example, add the path with the command git remote add origin [email protected]:marciellioliveira/Linguagem-C.git

Then leave files ready to be started with git add with the git add command, you can add all files created at once using a git add . point or simply one file at a time with git add arquivo.extensão

Then you can commit the files with git commit -m 'A mensagem referente ao commit' now your files are already in the local repository, when you want to send to the remote repository, with the command git push -u origin master

Remember that origin is the name of the alias you gave when adding the remote repository, and master means the master branch in your repository.

For more detailed information, there is the Pro Git Book already translated into Portuguese, it's free, just consult.

link

Note that if you use ssh, see Chapter 4 to create and add to the repository, github itself contains a guide to help.

link

link

    
17.12.2015 / 23:10