Support Free C++ Education
Help us create more high-quality C++ learning content. Your support enables us to build more interactive projects, write comprehensive tutorials, and keep all content free for everyone.
The Best of Both Worlds
One of the most common requests from learners has been the ability to code in their own environment. They love the guided projects and automated feedback, but they want to use their favorite IDE with all its features: code completion, debugging, custom themes, and keyboard shortcuts they've mastered over years.
We heard you. Our Git integration lets you work on guided projects locally while keeping everything that makes HelloC++ effective: automated builds, test feedback, and progress tracking.
How It Works
The Git integration gives you a personal repository for each guided project. You clone it to your machine, code in your preferred IDE, and push your changes. Our build system automatically compiles your code, runs tests, and updates your progress.
The workflow:
- Choose "Local Development (Git)" when starting a project
- Clone your personal repository
- Code in your favorite IDE
- Push to trigger automated builds
- View build results and test feedback
- Steps complete automatically when tests pass
No manual checking. No copy-pasting code. Just a natural development workflow with automated feedback.
Getting Started
Step 1: Choose Your Development Mode
When you start a new guided project, you'll see a choice:
Web Mode: Code directly in your browser with our Monaco editor. Great for quick sessions or when you're on a shared computer.
Git Mode: Clone the project and use your own IDE. Perfect for serious development sessions where you want full control.
Select "Local Development (Git)" to use the Git integration.
Step 2: Clone Your Repository
After selecting Git mode, you'll see setup instructions with a clone command:
git clone https://hellocpp.dev/git/abc123xyz your-project-name
This URL is unique to you. It connects to your personal repository for this project.
Run the clone command in your terminal:
cd ~/projects
git clone https://hellocpp.dev/git/abc123xyz opengl-blackhole
cd opengl-blackhole
You'll see the project's starter code, ready for your IDE.
Step 3: Initialize the Connection
Before you start coding, push an empty commit to verify everything works:
git commit --allow-empty -m "Initial setup"
git push
The setup page will detect your push and show "Setup complete!" You're ready to start coding.
New to Git? Don't worry. Check out our Git Fundamentals series to learn the basics before diving in.
Step 4: Code and Push
Open the project in your IDE. Make changes to complete the current step, then commit and push:
git add .
git commit -m "Implement vertex shader"
git push
Each push triggers an automated build. The build system:
- Compiles your C++ code
- Runs automated tests
- Updates your progress if tests pass
Step 5: View Build Results
After pushing, check your build status at /git/repositories. You'll see:
- Build status: Queued, Compiling, Testing, Passed, or Failed
- Commit info: Your commit message and hash
- Duration: How long the build took
- Test results: Which tests passed or failed
Click on a build to see detailed logs, including compiler output and test feedback.
Understanding Build Statuses
Your builds progress through several stages:
Queued: Your push was received and is waiting to be processed.
Compiling: The build system is compiling your C++ code. You'll see compiler output if there are errors.
Testing: Compilation succeeded. Automated tests are running against your code.
Passed: All tests passed. The current step is automatically marked complete.
Failed: Something went wrong. Check the build logs to see what failed.
Superseded: A newer push replaced this build. Only the latest push is built to save time.
Viewing Build Logs
Build logs show everything that happened during your build. For in-progress builds, logs update in real-time every few seconds.
What you'll see:
- Compiler warnings and errors
- Test output with pass/fail status
- Helpful hints if tests fail
- Links back to the project step
If a build fails, the logs tell you exactly what went wrong so you can fix it and push again.
Best Practices
Commit Often
Don't wait until everything is perfect. Commit after each meaningful change:
git add .
git commit -m "Add basic window initialization"
git push
Frequent commits mean:
- Faster feedback on whether you're on track
- Easier to identify which change broke something
- Better history to review your progress
Write Clear Commit Messages
Your commit messages appear in build history. Good messages help you track progress:
# Good
git commit -m "Implement orthographic projection matrix"
git commit -m "Fix fragment shader color output"
git commit -m "Add keyboard input handling"
# Less helpful
git commit -m "stuff"
git commit -m "more changes"
git commit -m "fix"
Check Builds Before Moving On
Wait for your build to complete before starting the next step. This ensures:
- The current step is actually working
- You understand any issues before adding complexity
- Your progress is properly tracked
Use Branches for Experiments
Want to try something without affecting your main progress? Use a branch:
git checkout -b experiment/custom-shader
# Make experimental changes
git add .
git commit -m "Try different lighting calculation"
git push origin experiment/custom-shader
Switch back to main when you're done:
git checkout main
Troubleshooting
"Permission denied" when cloning
Make sure you're using the exact URL from the setup page. Each URL is unique and tied to your session.
Build stuck in "Queued"
Builds are processed in order. During busy times, there might be a short wait. If it stays queued for more than a few minutes, try pushing a new commit.
Compilation errors
Check the build logs for compiler output. Common issues:
- Missing includes
- Syntax errors
- Wrong file structure
The logs show the exact error messages from the compiler.
Tests failing
The build logs show which tests failed and why. Compare your output with the expected results. If you're stuck, the project step usually has hints.
Can't push new changes
If you see "rejected" when pushing, your local repository might be out of sync:
git pull --rebase
git push
IDE Recommendations
Any IDE that works with C++ works with our Git integration. Some popular choices:
Visual Studio Code: Free, lightweight, excellent C++ support with extensions. Great for beginners.
CLion: JetBrains IDE specifically for C++. Powerful refactoring and debugging.
Visual Studio: Full-featured IDE for Windows. Industry standard for C++ development.
Xcode: Apple's IDE for macOS. Integrates well with Apple's graphics frameworks.
Vim/Neovim: For those who prefer the terminal. Highly customizable.
Choose whatever makes you productive. The Git integration works with all of them.
System Requirements
To use the Git integration, you need:
- Git: Installed and configured on your system
- C++ Compiler: To compile and test locally before pushing
- IDE or Text Editor: Your choice
Some projects may require:
- CMake: For building projects with multiple files and dependencies
If you don't have Git installed, check out Installing Git for setup instructions.
Why Use Git Mode?
Full IDE power: Use code completion, debugging, refactoring, and all your favorite features.
Familiar environment: Work in the setup you've customized over time.
Offline development: Code without an internet connection, push when you're back online.
Real-world workflow: Practice the same Git workflow used in professional development.
Better for long sessions: Comfortable environment for deep work.
Why Use Web Mode?
Zero setup: Start coding immediately in your browser.
Any device: Works on shared computers, Chromebooks, tablets.
Quick sessions: Great for short practice or reviewing concepts.
Guaranteed compatibility: No local environment issues.
Choose based on your situation. Many learners use Web mode for quick exercises and Git mode for guided projects.
Switching Between Modes
Once you've started a project, your development mode is set. Your progress (completed steps) is tracked in your account, but your code is not synced between modes. Code written in web mode stays in web mode, and code pushed via Git stays in your Git repository.
To switch modes, you need to reset your project and start fresh:
- Go to the project page and click the reset option
- This archives your current progress and code
- Start the project again and choose your preferred mode
Keep in mind that resetting clears your code. If you've made progress you want to keep, make sure to save your code locally before resetting.
What's Next?
Ready to try Git mode? Start any guided project and select "Local Development (Git)" when prompted.
New to Git? Our Git Fundamentals series covers everything you need to know, from installation to advanced workflows.
Already comfortable with Git? Jump straight into a project and start coding.
Happy coding!
Support Free C++ Education
Help us create more high-quality C++ learning content. Your support enables us to build more interactive projects, write comprehensive tutorials, and keep all content free for everyone.
About the Author
Software engineer and C++ educator passionate about making programming accessible to beginners. With years of experience in software development and teaching, Imran creates practical, hands-on lessons that help students master C++ fundamentals.
Related Articles
Working with GitHub: Remote Repositories and Collaboration
Connect your local Git repository to GitHub. Learn to push, pull, clone, and collaborate with remote...
Git Branches and Merging: Parallel Development Without Chaos
Learn to use Git branches for safe experimentation and parallel development. Create branches, merge...
Understanding Git Commits: Snapshots, History, and Time Travel
Go beyond basic commits. Learn what commits really are, how to write meaningful commit messages, nav...
Article Discussion
Share your thoughts and questions
No comments yet. Be the first to share your thoughts!