Open miguelmartins17 opened 4 years ago
In just a few minutes I could understand that the basic steps about GitHub were already being used every day, how to create a repository, create a branch, edit an existing file, and how to create a request. 👍
It is not yet time to celebrate there are still many things about Git that I have to learn every day and day to improve.
I am currently reading and following the Git-it Guide the interactive workshop present in the repository:
I'm following the Git-it guide that's in the Start-here repository.
So far I am currently at step 5/11 and I intend to continue and see if I can finish these 11 steps today. I've already understood how I can use git to create new repositories and insert information there.
I am now in step five of the creation of a remote repository. 5️⃣ I was able to create the repository ,and I'm doing it right now to create a repository that can help you with possible Flutter application ideas to be used in my day to day and in other people's day.
This is the repository I will use to express future ideas about Flutter applications.
Then I was able to connect the local to the remote. Using this command,
The next step would be to pass everything that was done locally to the Github using the command,
When I ran that command on the command line, the following error appears.
So I tried to run the git push --set-upstream origin master command and I continue with the same error.
@miguelmartins17 run the following command:
git remote -v
@nelsonic This is the result.
@miguelmartins17 looks like you have it setup correctly. Are you able to make a change on GitHub and git pull
it to your localhost
?
@nelsonic I've been researching and found out what the cause of the error was, so the cause of the error is due to the repository still being empty. There are no commits in the repository.
Resolution
Create the first commit inside of the repository and then it can be pushed.
`touch initial
git add initial
git commit -m "initial commit"
git push -u origin master`
By using this git push -u origin master command I was able to already insert the code into the repository I created. I needed to enter my Github username and password to change data.
Here is what changed we send our branch named 'master' to our remote on GitHub named 'origin'.
If you enter the repository now it is no longer empty, a file with "initial commit" will appear that will be changed but that means that with those commands it works.
I finished the Git-it workshop today and learned some basic things about how Git and Github work.
I intend to continue watching and following the Tutorials present in the Start-here repository. The tutorial I'll start now is the learn-git-basics in order to deepen my knowledge.
I'm getting to the Committing part and I'm trying to finish this tutorial today. 👍
I took my day off today to learn Git and to use Github correctly. I had some doubts about how to add code or files to Github, how to perform a Git Push and how I can improve my performance when using Github. 💭 I've increasingly had the need to learn Git even putting other repositories as priorities to learn Git and how Github works can revolutionise my performance and save me a lot of time and headaches.
So I'm going to enjoy the day by starting to read: https://github.com/dwyl/start-here#git--github and leave everything I learn here.