Git and GitHub

When I first learned about GitHub, I thought it was just a website. It was very confusing and intimidating. However, I was told by peers the importance of GitHub for programming, and especially because I had found myself at a dead end during an early programming project.

I have a (somewhat embarrassing) first project up on GitHub (which is a perfect example of code that needs to be cleaned up–a fun idea for a future project). However, that first project from years ago was a great introduction to GitHub.

First, Git and GitHub are not the same thing. When I looked up “what does Git stand for?” I stumbled upon an interesting story. Git is actually not a meaningful acronym, instead it was chosen because it was most likely to never be used and mess up someone’s code. The story goes as so:  Torvalds created the software and named it after the British slang word, “Git,” which translates to “a rotten person.” 

GitHub is a website, a service, where people can collaborate and track the history of code. It’s a wonderful space for people to learn and grow. However, it is possible to be proficient in using just the GitHub website without actually working with Git through the terminal, and vice versa.

The goal is to balance usage of both Git and GitHub through the terminal and website. Prior to this post and day of studying, I had mostly just worked on the GitHub website and not the terminal. Having gone through multiple videos so far from the “Git and GitHub for Poets” video series by The Coding Train on Youtube, I’m more familiarized with working in the terminal with Git and GitHub. It’s been an interesting ride, and this is just the beginning!

Link to series playlist: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV

Glossary of Important Terms

Here are some notes I took while watching the above tutorials. Hope you find them as helpful as I do!

Git: version control software

GitHub: web service where people can collaborate on open source code and track project history

Repository (or, “repo”): a project; a repository of files. Repository names can’t have spaces so they will include a dash as in: repository-title-example

Commit: a change to a file that is saved in the repository

Commit Hash: a unique identifier for each particular commit

Master Branch: original origin of a repository

Branch: a copy of files for experimentation before a commit is merged to the master branch

Pull Request: a way to ask the collaborators of a repository to approve your changes and merge them into the master branch

Merge: the action of a pull request successfully combining changes into the master branch of a repository

Fork: copying the repository to have under your own account for experimentation without effecting the original core version

Issues: a place to leave a comment about a problem, or to ask a question. Raising an issue means to file a potential bug

Fixes: if you use the word “fixes” in a commit changes title, the issue will be automatically closed

Remote: duplicate instance of a repository that exists on a server. When you say “git push” you need to say “git push __where__”

*Tip on Commit Hash Codes: place the commit hash code in a comment to help link to the issue

Terminal Instructions (via GitHub):

to create a new repository on the command line:

echo "# terminal-practice" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/KIBautista/terminal-practice.git
git push -u origin master

 to push an existing repository from the command line:

git remote add origin https://github.com/KIBautista/terminal-practice.git 
git push -u origin master

Practice Progress

After some trial and error, I was successfully able to push a new file into my GitHub repository through the terminal. It was very cool to see it work! I ran into some trouble shooting errors with getting into the proper place on my desktop for the repository, and for getting the remote to work, but finally, it has worked!

I found trying to change my login information through the terminal to be a little convoluted, and I was worried that an incorrect password was the cause of my push updates not going through. However, seeing my text file successfully added on GitHub through the Terminal confirms that the password and login is correct.

I feel more confident now to look around on GitHub for open source projects and contribute to them, which is the goal!

For anyone wishing to learn more, the video series I have found to be incredibly helpful is available for free on YouTube, and it is called “Git and GitHub for Poets” by The Coding Train. I very much appreciate the depth and visual interface used in this videos; they’re very user friendly and great for beginners!

Hacktoberfest 2019!

Image source – https://hacktoberfest.digitalocean.com

Project and Learning Update

Before I get into the Hacktoberfest fun, I wanted to update you on my progress since the last post.

I was in New York visiting family these past few months (I recently moved from NYC to Florida last year) so it’s been a little hectic! Luckily my brain needed the time to process everything I had learned from the previous machine learning course before diving into a new one.

Since then, I’ve began another course on Udemy about Machine Learning and Data Science in Python and R, which is dense but very fascinating! I’ll definitely need to add math for python, and matrix math, to my list of topics to study.

I’ve also connected to an awesome community, Women Who Code organization, which is how I learned about Hacktoberfest, through conversation on the slack channel!

Hacktoberfest Participation

For Hacktoberfest, everyone get’s together and participates in helping open source code by submitting contributions. Open source is another reason why I love this field, because the teamwork is inspiring. In order to do this you need to use GitHub to submit pull requests. Prior to this event, I had some light experience in GitHub but hadn’t gone into too much depth yet. After this event, I now understand how incredibly crucial it is for anyone interested in developing to become proficient. It’s a skill most employers will expect you to have, as a bare minimum. Moreover, GitHub is where a lot of the magic happens.

In order to be considered a full participant of Hacktoberfest and receive a super cool shirt, (dreams!), you need to submit at least four pull requests that adhere to the Hacktoberfest guidelines and rules.

I submitted five pull requests. I felt so happy to see the bar completed! But, my requests had a little clock icon near it, meaning that their eligibility was pending. To this day, a few months later, they’re still pending. However, two of my submissions were unfortunately submitted to ineligible repositories. Since the repository was ineligible, so was my pull request on that repository.

If any of these words confuse you, don’t worry, they confused me too at first. But as a beginner, I loved the freedom of Hacktoberfest. It was a time where everyone was getting together and people knew that beginners would be involved. This gave me more confidence to actually participate by submitting pull requests with less fear.

I’m so incredibly happy to have participated in Hacktoberfest this year, and am excited to see my performance for next year’s event after much more learning. I’m now off to learn, more formally, about GitHub, in preparation!

Happy Coding!