We will master creating github issues, making issues reference commits , writing good commit messages and writing commits that span multiple lines. We will also learn about git log and git status commands.
Writing good and clear commit messages is one of the recommended git best practices.
-
Create Github issue for your commit
-
Make commits spanning multiple lines
-
Write good commit messages
-
Push commit to github as PR
-
Create an Issue on this repository. Issue should read Add
<my-name>
to contributors list -
In my case it will read Add Ndubuisi Onyemenam to Contributors list
-
Go to Project folder in your computer and Run the
git log
command on your CMD or Terminal -
You will see a blinking colon :, type wq then enter to exit
-
Run
git status
command on your CMD or Terminal -
Add screenshot to show both output
-
Run git pull origin master to pull in lastest changes from repo
-
Add your name to contributors.md file in day3challenge folder
-
run
git add .
to add all changes -
run
git commit
command without the -m flag -
Notice that you have a text editor open
-
Screenshot the open Editor
-
Write Commit message header i.e Add my name to contributors list
-
add screenshot of commands made
-
Write Fixes Issue #
<the issue number you created>
above in the line following it -
All in all your commit message will look like
Add my name to contributors list
add screenshot of commands made
fix issue #27
-
Pro Tip: All commit messages should be in the present tense
-
Also good commit message are in the format ; this commit will "Your commit message in present tense", all our commit messges fit well with this rule i.e this commit will; fix issue #27 etc
-
Since commit messages should not be more than 50 characters long(too), we write extra commit message lines after the initial message line, see screenshot for example
-
Save file by pressing Controlkey + o
-
Then press enter
-
Press Control + x to exit the editor
-
Create a file called <yourname-day3.md> in the day3challenge folder
-
Add a Screenshot image for git status and git log command
-
Add a Screenshot image for the git commit editor
-
Make a pull request to submit contributors.md file and your day 3 screenshot file
-
Make a Post in the Facebook group telling us about your Progress and what you have learnt
-
Extra - feel free to send in a Pull request if you see a typo, spelling error anywhere in this codebase
- Read this wonderful post on commit messages https://medium.com/@steveamaza/how-to-write-a-proper-git-commit-message-e028865e5791
- You can also read this too https://chris.beams.io/posts/git-commit/
- Google is your friend, check out Google
- Watch this Video by the Facebook Open Source Team https://youtu.be/c6b6B9oN4Vg
- See my Solution here day1solution, notice that I uploaded my images on github here fbdevcowerri#5
- Create an issue on github and tell us what challenges you are having, someone would be kind enough to help you out
- Tell us about the challenges you are facing in the facebook group
- Wait for the solution video which comes out by the end of everyday D:, don't do this
Using markdown .md files for documentation
A good documentation is the number one reason why developers adopt Software languages and frameworks, as a good documentation allows you to get work done faster. In this task we will be exploring using Github markdowns!
-
Create Github issue for your commit
-
Create a Github markdown file
-
Install VS code text Editor
-
Make commits spanning multiple lines
-
Push commit to github as PR