Coral Orbit Studio logo

Git Protocol

The Ultimate Developer Toolkit

Welcome to the Git Sandbox.
Type git init to begin, or help for commands.
~/project $

Initialization

git init

Initialize a new local repository in the current directory.

git clone <url>

Download an existing repository from a remote server.

Inspection & Setup

git config

Set your ID badge: git config --global user.name "Your Name"

git remote -v

Check exactly which cloud URLs your code is linked and syncing to.

Snapshots

git add .

Stage all modified files for the next commit snapshot.

git diff

See the exact lines of code you changed before staging them.

git commit -m "msg"

Permanently save the staged changes into the local timeline.

Branching

git checkout -b <br>

Create and switch to a new branch instantly.

git branch -d <br>

Delete a local branch after you've successfully merged it.

Sync

git pull origin main

Fetch and merge changes from the remote main branch down to your local branch.

git push -u origin <br>

Push a newly created branch to the remote repository and link them.

Teamwork

git fetch

Download remote changes to inspect them before merging them into your code.

git blame <file>

Find out exactly who wrote which line of code (and when they wrote it).

Quality of Life

git commit --amend

The 'Oops' command. Fix your last commit message or add a missing file to it.

git log --graph

Draws a cool ASCII art tree of how branches merge into each other over time.

Damage Control

git restore <file>

Discard uncommitted local changes in a specific file.

git reset --soft HEAD~1

Undo your last commit, but keep all your changes safely staged.

git merge --abort

Panic button! Stop a messy merge conflict and go back to how things were.

Advanced Matrix Commands

git stash

Temporarily shelves (stashes) your uncommitted changes so you can switch branches.

git rebase -i

Interactively rewrite history! Squash commits together or edit commit messages.

git cherry-pick <id>

Grab one specific commit from another branch and apply it to your current branch.

git reflog

The ultimate safety net. Shows a log of *every* action you've taken in the repo.

Code Copied!

Terminal Feedback

Help me improve the sandbox

Transmission Sent