Setup
Git and GitHub
Git keeps your code backed up, keeps a record of how it got built, and gives you the public link a Pixl review needs.
1. Initial setup
Check Git is installed with git --version, then tell it who you are. Use the same email as your GitHub account:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
2. Starting a repository
Inside your local project folder, run:
git init
git add .
git commit -m "initial commit"
Make a new repository on GitHub, leave it public, and point your local folder at it:
git remote add origin https://github.com/yourusername/my-project.git
git branch -M main
git push -u origin main
3. Daily workflow
As you build, commit regularly:
git add .
git commit -m "add navigation menu and mobile styling"
git push
Write commit messages that say what changed. Reviewers read your history, and "update" fifty times over tells them nothing.
4. Setting up a .gitignore
Keep API keys, build output and dependency folders out of the repo. Put a .gitignore in the root:
node_modules/
.env
dist/
.DS_StoreBuilt by alexx