Git online compiler

A simulated Git repository with a live commit graph. Runs in your browser.

Learn Git & GitHub →
commands.sh
# Online Git playground (simulated). Each line is a command.
git init
echo "# My project" > README.md
git add README.md
git commit -m "First commit"
git switch -c feature
echo "new feature" > feature.txt
git add .
git commit -m "Add feature"
git switch main
git merge feature
git log --oneline --graph
Terminal

Press Run to run the script on the left in a fresh repository, or type commands below.

$