Country or region and language

    Choose your country or region and your language.

    Suggested for you

      All countries and regions

        Choose your character

        It shows in the top bar and on your profile. Change it any time.

        The Work Gym / Playgrounds

        Git playground

        A terminal with a small Git repository already set up: two commits on main, a feature branch and a new file waiting. Practice commands and see the result straight away. You don't need an account, and there is nothing to install.

        Opening the workspace

        Independent practice environmentNot affiliated with Software Freedom Conservancy or GitHub, Inc.Details

        Independent practice environment

        This is an independently developed practice environment by The Work Gym for learning Git. It is not an official Git tool.

        The Work Gym is not affiliated with, sponsored by, endorsed by or certified by Software Freedom Conservancy or GitHub, Inc.

        Git is a trademark of Software Freedom Conservancy. GitHub is a trademark of GitHub, Inc.

        Embed this playground on your site

        What you can try

        1. See where you are: git status, git log --oneline --graph --all and git branch.
        2. Commit the new file: git add notes.txt then git commit -m "Add notes".
        3. Compare branches: git diff main feature/by-region.
        4. Merge the feature branch: git merge feature/by-region.
        5. Change a file, then try git stash, git stash pop and git restore.
        6. Make a branch of your own with git switch -c, commit on it and merge it back.

        The sample data

        An order report project: report.py, README.md, data/orders.csv and a .gitignore. main has two commits, feature/by-region has one more, and notes.txt is new and untracked.

        Learn it step by step

        The playground checks nothing. In the course, lessons come in order and every exercise is checked the moment you finish it, with a hint that names the mistake. The first unit is free.

        Course: GitLesson 1: Repository creationLesson 7: History and commit graphsLesson 13: Branch referencesLesson 18: Three-way mergesLesson 21: Stashes and unfinished workTest your level

        Questions about the playground

        Is it real Git?

        It is a Git simulation that runs in your browser: the everyday commands (status, add, commit, log, diff, branch, switch, merge, stash, restore, reset, tag) behave as Git does, but there is no remote to push to.

        Can I break anything?

        No. Reset, delete or rewrite as much as you like: Start again puts the sample repository back as it was.

        Is the Git playground free?

        Yes. You don't need an account or a card, and it runs in your browser, so there is nothing to install.

        Is my work saved?

        Only in this browser. The playground keeps your last session on this device so it is there when you come back, and sends nothing to an account. Start again puts the sample data back.

        Other playgrounds

        Your Work Gym account

        Save your progress and pick up on another device. Your browser's progress comes with you.

        New accounts get 12 hours of full access: every course, unit, project and exam. The clock starts when you open your first lesson.

        Plan your practice from a job ad or syllabus

        Have a referral code?

        or

        You can keep practicing without an account.

        Change your plan

        Checking the price

        Help and feedback

        Ask a question, tell us what is not working, or share an idea. We reply by email.

        What is it about?

        We use it only to reply to you.