Меняйте что-то одно за раз
Draft: this lesson is an outline and will be expanded.
Working in small steps means you ask for one change, check it, and save it before asking for the next. In this lesson you improve the first version this way. By the end you will have a site with several improvements and a save point for each one.
A save point is a saved snapshot of your folder that you can return to later. You make one in GitHub Desktop by writing a short description and pressing the commit button. A commit is the name for one save point. If a later change goes wrong, you go back to the last save point and lose almost nothing.
The loop
- Ask for one change.
- Check the result in your browser.
- Save a commit if you like it, or ask for a correction if you do not.
What you will do
- Put your
my-first-sitefolder under GitHub Desktop. Do this once, using what you learned in the GitHub course. - Make a first commit with the description
First version. - Pick the most important item from your list of problems.
- Ask the assistant for that one change only, for example:
Make the heading on the home page larger and change its colour to dark blue. Change nothing else. - Reload the page in your browser and look at the result.
- If it is right, open GitHub Desktop and commit with a description such as
Larger blue heading. - Repeat with the next item. Do at least three rounds.
Why “change nothing else” matters
An assistant tends to be helpful and may tidy other parts. That is how a working page quietly breaks. Saying what to leave alone keeps each change small enough to check.
Check yourself
- You made at least three changes, each with its own request and its own commit.
- GitHub Desktop shows a history of save points with clear descriptions.
- You can name the last save point where the site worked.
What comes next
Go on to When something breaks, where you handle a change that makes things worse.