Following on from branching (in other words, you want to do this
exercise on you <your_github_username>-asks-a-question
branch):
In the student-questions
directory, write a file named
<your_github_username>-workshop-question.md
and ask a question in that file!
Donal says: The file suffix .md
stands for
Markdown. The
writing-on-github page
describes how to use Markdown including GitHub flavoured
Markdown.
git status
Will show that the file is "untracked".
If you want to just see the short version of the git status, run this:
git status -s
git diff
Donal asks: What will this show? Why?
git add student-questions/<your_github_username>-workshop-question.md
Then:
git status
Will show that the file is "staged".
git diff --staged
This will show you the patch view of the differences between the staged files and what was in the last commit.
git commit -m "add question file"
Then:
git status
Will show that the file is "committed".
Donal says: Your file has been committed but only to your local repository.
git push origin <your_github_username>-asks-a-question