This repository is section A of the GitRuler exercises.
If you do not already have a your own repository for these exercises fork this repository. Clone this repository
To make sure that your are correctly listed as an editor in the history of a file you must configure git
on each new machine (or network if your profile follows you around).
- Configure
git
with your correctuser.name
anduser.email
. If you are using Github you should use the email address used to set up you Github account which you can find on the GitHub email settings page - Configure
git
so that when it wants you to enter some text (e.g. for a commit message) it will open an editor that you are able to use (nano
is usually a safe bet)
- Use a text editor to add
Manfred Delmonte
to a new line infiles/employees.txt
andPeaches
to a new line infiles/products.txt
. - Stage the changes that you made to the files. Use the
git status
command to check that you have staged all of your changes. - Commit your staged changes using the commit message "Add Manfred and Peaches".
Once the exercise is complete, push this repository to the remote. If there are multiple branches for an exercise, make sure that you push them all.
To ensure that you have you correctly pushed everything that you need to, you could clone the remote repository into a separate folder and re-run gitruler.
- For many of the steps you could use the Git cheat sheet or git - the simple guide to find the correct command.
- For setting up your git configuration you can see the "Your Identity" and "Your Editor" sections of the Git Pro Book.
- For staging and committing modifications to already tracked files take a look at "Staging Modified Files" and "Committing Your Changes" in [Git Pro Book]https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository). These sections will also explain how to provide commit messages.