CICD

Git Playground

Git is a distributed version control system for tracking changes in source code.

Get access to the Git playground with one click

Welcome to the Git Playground!

A lightweight Alpine sandbox with Git pre-installed — master the full local workflow: init, stage, commit, branch, merge, rebase, cherry-pick, and stash.

What’s Pre-installed

  • git (latest), vim, nano, curl, wget, jq, tree
  • SSH client for key generation and remote operations
  • Default branch: main pre-configured globally

Quick Start

git init myrepo && cd myrepo
git config user.email you@example.com
git config user.name "Your Name"
echo "# Hello" > README.md
git add README.md
git commit -m "initial commit"
git log --oneline --graph

Common Workflows

# Branch & merge
git checkout -b feature/new-feature
echo "feature code" >> app.py
git add -A && git commit -m "add feature"
git checkout main && git merge feature/new-feature

# Rebase workflow
git checkout -b fix/bug
git commit -am "fix bug"
git rebase main

# Stash work-in-progress
git stash push -m "WIP: refactor auth"
git stash list
git stash pop

Advanced Tips

# Interactive rebase to squash commits
git rebase -i HEAD~3

# Find which commit introduced a bug
git bisect start
git bisect bad HEAD
git bisect good v1.0

# Search commit history
git log --all --grep="fix login"
git log -S "password_hash" --oneline

Session Notes

  • Session lasts 1 hour.
  • No outbound network — practice local operations; push/pull requires SSH access to a remote.