Start here: complete step-by-step guides

Put your code on GitHub (your first push)

Create a repository, keep secrets and build folders out with .gitignore, and push your project for the first time.

  1. Create a GitHub repository
  2. Add a .gitignore file
  3. First push
  4. Signing in to GitHub
  5. Every change after that
  6. 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_Store

3. 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 main

Signing 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 push

Next

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.

Next step

Move your site, or your whole cloud estate

Shared hosting you can buy in two minutes. Infrastructure and managed services quoted by an engineer within one business day.