Step through git and jj commands interactively — watch the commit graph update in real time and see the terminal output for each command.
The classic Git integration strategy: develop on a feature branch and bring work back to main with an explicit merge commit that preserves the full fork in history.
gitbranchingmerge
Steps0 / 8
1
$git init my-app && cd my-app
Initialize an empty Git repository in a new directory.
2
gitgit commit --allow-empty -m "Initial commit"
Create the first commit on main — the root of the repository.
3
gitgit checkout -b feature/login
Create and switch to a new feature branch. Both main and feature/login point to the same commit for now.
4
gitgit commit -m "Add login form"
Commit on the feature branch. main stays behind while feature/login advances.
5
gitgit commit -m "Add auth middleware"
A second commit on the feature branch.
6
gitgit checkout main && git commit -m "Update dependencies"
Switch back to main and add a commit. Now main and feature/login have diverged — each has commits the other lacks.
7
gitgit merge feature/login
Because the branches diverged, Git creates a merge commit with two parents — one from each branch — preserving the full history fork.
8
gitgit branch -d feature/login
Delete the branch label. The commits remain reachable through the merge commit — only the pointer is removed.