It’s October 2020 and time for the 7th Hacktoberfest. Between the 1st October and 31st October Hacktoberfest encourages anyone from developers, to students to those that just want to give Git a shot, to complete some Git pull requests and help out with public repositories on GitHub.
I’ve not taken part in previous years but this year I’m making more of an effort, aiming to take part and encouraging others to do so as well (thus this blog post). So if you want to learn about Git, want to help with a public repository or just want to try a new skill please consider joining Hacktoberfest – https://hacktoberfest.digitalocean.com/
If you’re worried about requirements then please stop worrying, sign up for a GitHub account, then visit the Hacktoberfest site and register. Then find a repository that interests you on GitHub and pull it. If you are struggling then search for repositories with the Hacktoberfest label.
Some Git commands that may help can be found on my blog post about Git from a while ago, but if you are looking for a quick run down:
- Make sure you’ve signed up on GitHub and Hacktoberfest
- Find a repository you want to contribute to
- Click the “Fork” button to fork the repository
- Click the code button and copy the URL
- On your device use git clone URL to clone the fork to your device
- Navigate (using the command line / terminal) into the cloned repository directory/folder
- Use git checkout -b NAME_YOUR_BRANCH to create a new branch with a name of your choice (it will be public so be sensible)
- Make a change, or several changes to a file or several files
- Use git add FILENAME if you edited one file
- Use git add . if you edited multiple files (or use step 9 to add each individual file)
- Add a message to the explain what has been changed. The message should be short (in length) and to the point. The command for this is git commit -m ‘MESSAGE_HERE’
- Then push the changes back to GitHub using the command git push origin NAME_OF_YOUR_BRANCH
- Remember to have fun!