First day of mentorship
Today I was at HUB21, starting my mentorship with Johns.I learned basics of git and github, and how much impact open-source code had on industry and how amazing it is. How it helped lots of people to fullfil their dreams. For example when Matt Mullenweg was using logging software that wasn't upadted for a long time and their main developer disappeared, Matt forked their open-source code and created well known Word Press from that!Mindblowing, right?You can read more about Matt Mullenweg story here: https://ma.tt/2003/01/the-blogging-software-dilemma/
I'm looking forward to learn new things whit this group of people.
Specificly I learned how to publish my local code on github,so others can fork it and then pull requests, whitch i can accept or deny, and our code will be merged or it wont.Then I can pull code back to my local repository.
Steps we went through
-
I made local repository with simple JS code
-
I installed git and commited my changes
-
I wanted to make code public so I made github repository
-
Using down written commands i uploded my code to my public github repository
-
Johns forked my code so he has clone that he can pull request on
-
I accepted Johns pull request
-
I pulled code to my local repository
Commands
git remote add origin https://github.com/danilozdravkovic/learning-git.git
This command allows my local repository to connect to a reomte server (github) so I can push the changes and make it public for my team or the world.Origin is the default reference to remote server.You can have multiple remote servers connected to your local repository.
git push -u origin master
This command pushes code to public repository on github.
Respository github link that i worked on:https://github.com/danilozdravkovic/learning-git