This kata will introduce you to the commands git add and git commit.
You can look at the bottom of this file, if you have not yet done basic git configuration.
- Run
. setup.sh(or.\setup.ps1in PowerShell)
- Use
git statusto see which branch you are on. - What does
git loglook like? - Create a file
- What does the output from
git statuslook like now? addthe file to the staging area- How does
git statuslook now? committhe file to the repository- How does
git statuslook now? - Change the content of the file you created earlier
- What does
git statuslook like now? addthe file change- What does
git statuslook like now? - Change the file again
- Make a
commit - What does the
statuslook like now? Thelog? - Commit the newest change
git addgit commitgit commit -m "My commit message"git loggit log -n 5git log --onelinegit log --oneline --graphtouch filenameto create a file (orsc filename ''in PowerShell)echo content > fileto overwrite file with content (orsc filename 'content'in PowerShell)echo content >> fileto append file with content (orac filename 'content'in PowerShell)
git config --global user.name "John Doe"git config --global user.email "johndoe@example.com
For the vim scared:
git config --global core.editor nano
For the windows peeps:
git config --global core.editor notepad
Other editor options:
git config --global core.editor "atom --wait"git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst"