This document explains everything you need to solve GitHub Layout tasks and send them for review.
- ❗ To avoid permissions issues, DO NOT place your projects folder on the
Desktop. - ❗ There should be NO SPACES in the path, e.g.,
C:\Users\Your Name\projects. - It is better to put repositories into
D:\projectsorC:\Users\YourName\projectson Windows, or/Users/YourName/projectson MacOS.
Connect GitHub to your Mate account.
- Open your profile page on the MA Platform.
- Scroll down and press the
Connectbutton next to GitHub. - Confirm Mate Academy app authorization.
- Open the task on the MA platform
- Fork the repo
- Check your forked repo URL
- Clone the forked repo
- Open the project in IDE
- Open the Terminal in your IDE
- Run
npm i - Run
npm startto open the page in a browser - Open another terminal
- Create the
developbranch - Update DEMO and TEST REPORT links
- Implement the task
- Run
npm run lintto check the code style - Run
npm tto pass tests - Run
git add ./srcto prepare your code for saving - Run
git commit -m 'add solution'to save changes - Run
git push origin developto send your code to GitHub - Run
npm run deployto publish your site to GitHub Pages - Create a Pull Request (PR) with a correct description
- If you need to update your PR
Click the Make a fork button. It will open the task repo on GitHub.
After the Fork process is finished, you should see the repo in your account (not the mate-academy).

Now you can check if it was synced to the MA platform.
- Go back to the task on the MA platform.
- The button should change to
Open the task. - If not, reload the page.
- Get back to the forked repo on GitHub.
Now you need to clone the forked project to your computer. Follow the next steps (and see screenshots below):
- Click the green
Codebutton. - Select the
HTTPStab. - Ensure the link contains your GitHub name (NOT
mate-academy). - Copy the link.
- Open Git Bash (Windows) or ZSH (macOS) in your projects folder (You installed it in the Git and Terminal course).
- Run
pwdin the terminal to check that you are in theprojectsfolder.- If not, navigate to it using the
cdcommand with the required path.
- If not, navigate to it using the
- Clone the repo by running the
git clonecommand with the URL you copied on GitHub.git clone replace-this-with-the-URL-from-github
Now you need to open the project in your code editor (VSCode).
- Run
code project-namein the terminal (for example,code layout_hello-world). - You will see the project name as a root folder name in VSCode.
- Use the shortcut
ctrl + `(Windows) orcmd + `(MacOS). - Check if you are inside the project (The project name is the last part in the terminal).
- Check if the terminal in VSCode is Git Bash (Windows) or ZSH (macOS).
Click here to see how to select the default terminal in VSCode
And wait until it downloads all the packages and finishes.
Note: You should run it once for every new task.
The command in the terminal will never finish.
- The command should open your browser at
http://localhost:8080/. - At this point, you should see the starting markup of the page.
- If the page is empty, add some text to the
<body>in thesrc/index.htmlfile. - The text should appear in the browser.
If the page is still empty after you added some text
If the page is opened at a different port (not :8080)
- If you see a different port.

- It means you already have another terminal running the
npm startcommand (maybe it is another project). - Stop the
npm startcommand in the current terminal by pressingctrl + c(all operating systems). - Close the other terminal running
npm start. - Run the command again for your current project.
- The URL should now be
http://localhost:8080/. - If the URL is still wrong, just restart the computer.
Use + or just press ctrl + shift + ` or cmd + shift + ` .
Run:
git checkout -b develop
or
git switch -c develop
If you see that the "develop" branch already exists
- Open the
readme.mdfile. - Replace the text
<your_account>with your GitHub username in theDEMO LINKandTEST REPORT LINK.
You should write the code in index.html and other files inside the src folder.
Run:
npm run lint
This error means you need to fix CRLF
- Run
git config --global core.autocrlf false. - Then, fix the CRLF in all the files you changed.
How to fix autoformatting in VSCode
- Here is the documentation.
- Run
Alt + Shift + Fto format the document.
- Read the
checklist.md; - Fix your code if needed;
- Run
npm run lintagain to ensure nothing is broken. - Run the tests:
npm test - Test results should be opened in a browser;
- If not, check if you fixed all the code style errors (
npm run lint).
Fix your HTML and CSS to make your page identical to the expected result.
If you can't run tests for some reason, just use a screenshot from
backstop_data/bitmaps_reference/Entire_document.pngto ensure your page looks as expected.
git add ./src
- Don't add irrelevant files at this point, like
package-lock.jsonor test snapshots. - You can always check which files were changed or added using the
git statuscommand. - Also, don't forget to add the readme.md file.
git add readme.md
Run the commit with a message describing what this code does.
git commit -m 'add task solution'
fatal: unable to auto-detect email address
- It means you forgot to configure your GIT name and email.
- See the commands above the error message and run them one by one with your email and name.
Run:
git push origin develop
Run:
npm run deploy
If you are getting some errors, run
npm run deploy -- -lto see more details.
The deploy process requires some time to prepare your page on GitHub after the command is finished.
To check if the page was deployed successfully, you need to check in the project settings on GitHub:
- Open the forked repo on GitHub;
- Click the
Settingstab at the top; - Choose the
Pagessection from the panel on the left; - There should be a link to your public page at the top (the same as your
DEMO LINKin thereadme.md). - If there is no link at the top, check if the
gh-pagesbranch appeared in the repo;- If not, run
npm run deploy -- -lto see more details.
- If not, run
- Wait for about 2 minutes and reload the
Settings > Pagesagain to see the link; - Open it to see your page.
- Select the
Pull Requeststab; - Click the
New pull requestgreen button; - Change the
comparebranch on the right todevelop; - Click the
Create pull requestbutton; - Copy the
DEMO LINKandTEST REPORT LINKfromreadme.mdto the PR description;- Links should contain your GitHub name (not
mate-academy)!!!
- Links should contain your GitHub name (not
- Click the
Create pull requestbutton one more time; - Check that your
DEMO LINKandTEST REPORT LINKwork as expected (open the page and test results); - Check if the task appeared in the table (only for full-time students).
❗ Do NOT close the PR and ❗ do NOT open several PRs. Only the first PR made after the fork is synced to the platform.
- If you have closed the PR - reopen it and request mentor review.
- If you can't open the PR - do another fork and create a new PR.
If you need an ADDITIONAL CODE REVIEW, click on the re-request button on the PR page.
If you use Linux, please make sure you adjusted writing permissions to let scripts work without
sudo. Correct permissions mean you don't see errors likepermission deniedafter running commands in the terminal.
npm installinstalls the project dependencies and runspostinstall- This creates reference files for pixel-perfect and tests
npm startruns the server required for development and testsnpm testruns the linter and testsnpm run lintruns the linter (code style check)npm run test:onlyruns pixel-perfect tests
npm run deploypublishes the page and test report togh-pages












































