~/wiki / spravka / github-from-scratch

GitHub from scratch: registration, first repository and basic commands

◷ 6 min read 5/25/2026

Main chat

A chat for vibe coders: news, guides, live cases, marketplace, and finding executors.

$ cd section/ $ join vibe dev

If you’re just starting out as a Vibcoder and haven’t worked with GitHub yet, this article is a solid start. Here we will go through everything from scratch, without water and with maximum practical benefit for working with AI agents.

By the end of the article you will have:

  • customized GitHub account
  • repository
  • understanding how to correctly commit code written by an agent
  • confidence in basic teams

Why is GitHub for you, Wibcoder?

Imagine asking Claude or Cursor to write a whole module. The agent issues 300 lines of code. You check, you run, everything works. And after two days, you realize you need to roll back the changes.

Without GitHub, you just lose everything. **

GitHub solves the main problem of vibcoding - history preservation and version control. This is your personal "flight log" of the project. You can't do it without him

  • roll back
  • working with multiple agents simultaneously
  • launch
  • show the project to the customer or investor

**GitHub is not for programmers. This is a must-have tool of any modern Vibcoder.


Step 1. Registration and account setting

  1. Go to github.com
  2. Press **Sign up **
  3. Enter email (it is better to use the main, not temporary)
  4. Create a nickname (username) – it will be in the link to all your projects (github.com/твой-ник)
  5. Choose a password and go through verification

** Account recommendations:**

  • Get a normal avatar (this is important for trust)
  • Fill in a brief profile (bio)
  • Enable two-factor authentication (Settings → Password and authentication → Enable 2FA)

Pro tip: If you plan to publish a lot of projects, make your account professional. Many customers and partners are looking at GitHub.


Step 2: Install Git and GitHub CLI (required)

Git installation

macOS:

bash
brew install git

Windows: Download the official installer with git-scm.com and install (leave all the boxes by default).

Linux (Ubuntu/Debian):

bash
sudo apt update && sudo apt install git -y

Check the installation:

bash
git --version

GitHub CLI (gh) is a command line tool that greatly speeds up work.

macOS:

bash
brew install gh

Windows (PowerShell):

powershell
winget install --id GitHub.cli -e --source winget

Linux:

bash
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y

After installation, log in:

bash
gh auth login

Choose GitHub.comHTTPSLogin with a web browser. Done!


Step 3. Create the first repository

There are three main ways. We'll sort it out.

Method 1. Through the web interface (the simplest)

  1. Press the green button New (or + → New repository)
  2. Fill in:
    • Repository name: my-first-vibe-project
    • Description: Мой первый проект, созданный с помощью ИИ
    • Select Public (bye)
    • Check the box Add a README file
    • Select .gitignore (or Python if you write it)
    • License → MIT License (recommended)
  3. Press Create repository

Done! You already have your first repository.

Method 2. via GitHub CLI (fastest)

bash
gh repo create my-first-vibe-project --public --add-readme --gitignore Node --license MIT

Method 3. Connect an existing folder (the most common case)

bash
cd ~/projects/my-project # Go to the project folder
git init # Initialize Git
git add .
git commit -m "Initial commit: project created with Claude"
gh repo create --source=. --public --push

Step 4. Major Git commands (with explanations)

Here are the commands you will use 95% of the time.

Basic workflow

bash
#1. See status.
git status

#2. Add changes to the index
git add. # add everything
git add src/app.py # add a specific file

#3. Create a commission
git commit -m "feat: added authorization via Telegram"

#4. Send to GitHub
gp push origin main

Useful commands for Vibcoder

bash
# Watch the history of the Commites (beautiful)
git log --oneline --graph --all

# Create a new branch (very important!)
git checkout -b feature/telegram-auth

# Switch to branch
git checkout main

# Merge the branch into the main
git merge feature/telegram-auth

# Cancel the last commit (without deleting the changes)
git reset --soft HEAD 1st

# See what's changed.
git diff
git diff -- staged

Step 5. How to properly work with code from an AI agent

This is the most important section for you.

**Rule #1: Never commit huge chunks of code with one committ.

Right approach:

  1. The agent wrote the code, you checked
  2. Break the changes into logical parts:
    • feat: добавил модель UserXX
    • feat: добавил эндпоинт /registerXX
    • fix: исправил валидацию emailXX
  3. Each commit is one complete thought.

Example of good Commite reports:

bash
git commit -m "feat: added authentication system"
git commit -m "fix: fixed token bug when rebooting"
git commit -m "docs: updated README with launch instructions"
git commit -m "refactor: brought logic to a separate service"

Pro tip: Use the prefixes:

  • feat: - new functionality
  • fix: - Correction
  • docs: - documentation
  • refactor: - refactoring
  • chore: - Technical changes

Step 6. First steps with branches (be sure to start immediately)

Never work directly with main.

bash
# Creating a branch for a new feature
git checkout -b feature/ai-chat

# Working, commiti...

# Back to the main.
git checkout main

# Flushing change
git merge feature/ai-chat

# Remove the branch (optional)
git branch -d feature/ai-chat
$ cd ../ ← back to Reference