- Create a GitHub repository
- Add a .gitignore file
- First push
- Signing in to GitHub
- Every change after that
- Next
1. Create a GitHub repository
Sign up at github.com, press New (or + → New repository), give it a name, choose Private, and do not tick "Add a README" — an empty repository is easiest for a first push. GitHub then shows the repository address, like https://github.com/you/my-app.git.
2. Add a .gitignore file
In your project's main folder create a file named .gitignore. It lists what must never go online: your secrets and things that are rebuilt on the server. A good start for most projects:
.env
.env.*
node_modules/
.next/
dist/
.venv/
venv/
__pycache__/
vendor/
target/
build/
.DS_Store3. First push
Open a terminal in the project folder (in VS Code: Terminal → New Terminal) and run these lines one by one, using your own repository address:
git init
git add .
git commit -m "First version"
git branch -M main
git remote add origin https://github.com/you/my-app.git
git push -u origin mainSigning in to GitHub
The first push asks you to sign in. On Windows and Mac a browser window opens — approve it. If you are asked for a password in the terminal, GitHub needs a personal access token instead (GitHub → Settings → Developer settings → Personal access tokens) or the free GitHub Desktop / VS Code sign-in.
Every change after that
git add .
git commit -m "Describe what you changed"
git pushNext
Connect the repository to your app under Git deployments — then every git push deploys automatically. See Deploy from GitHub, GitLab or Bitbucket.
Stuck? Our engineers answer support tickets around the clock. Contact us, or create an account and open a ticket from the dashboard — the same guides are there too.