Git Student Developer Pack
Git Crash Course
Making our own feature branch + responder
GitHub offers a Student Developer Pack with unlimited free private repositories for students at eligible Canadian Universities. I recommend setting this up if you haven’t done so already, you can find the link below under important links
To gain familiarity with version control, we will each be creating our own local branch which we will work on when creating our responder. Once complete, we will learn how to create pull requests and conduct code reviews to merge our changes back to the master branch.
Once all branches are merged back into master, we will have a branch (master) with all the responders that you have created. Doing a
git pull after this will pull all the responders created into your local code.
Get your Git account setup so that I can add you as a project collaborator
Navigate to the repository homepage (https://github.com/muneebazam/Automation-Wizards)
Click on the branch button, enter the name of the branch you wish to create and press create
Open up the project location in command line and switch to the branch you just created:
git checkout <branch_name>
Duplicate and rename the responder_template.ex file located in lib/slackbot/
Create your own responder by editing the following code block in the file:
hear ~r/hello/, msg do reply msg, "hey!" end
Stage this file to be included in your next commit:
git add <file_name>
Commit your changes:
git commit -m "include a descriptive message!"
Push your changes back to the remote repository:
Navigate over to the repository homepage once again: (https://github.com/muneebazam/Automation-Wizards)
Make sure your branch has been selected under the branch button
Click New Pull Request
Verify that the base branch is master and that the only change is the responder file you just created. Include reviewers if necessary.
Click Create Pull Request
Code Review at least 2 other pull requests! *(we’ll do this together)