Mission: Create your first Git project from A to Z.
# Create a folder and initialize Git
mkdir mon-premier-projet && cd mon-premier-projet
git init
# Check the status
git status # Should show "On branch main, no commits yet"Result: The .git/ folder is created = your project is now under Git!
# Create base files
echo "print('Hello World')" > app.py
echo "# Mon Premier Projet Git" > README.md
# See what Git sees
git status # "untracked" files
# Add to staging
git add . # All files
git status # Files "staged for commit"
# First commit
git commit -m "Initial commit: Hello World app"
# Check the history
git log --onelineResult: Your first commit is in the history!
Mission: Learn the modify → add → commit cycle.
# Modify app.py
echo "print('Hello Git!')" > app.py
git status # "modified: app.py"
git diff # See the changes
# Add the new modification
git add app.py
git status # "Changes to be committed"
# Commit
git commit -m "Update: Hello Git message"
# Add a new file
echo "def helper(): return True" > utils.py
git add utils.py && git commit -m "Add utils module"
# See the evolution
git log --oneline # 3 commits nowMission: Connect your project to GitHub.
https://github.com/ton-username/mon-projet.git)# Add the remote (replace with your URL)
git remote add origin https://github.com/ton-username/mon-projet.git
# Check the connection
git remote -v # See the configured URL
# First push
git push -u origin main # Push + setup tracking
# Later pushes are simpler
git push # That is enough nowFinal checklist:
git status → "nothing to commit, working tree clean"git log --oneline → at least 3 commitsgit remote -v → GitHub URL configuredMake a modification:
echo "print('Final version')" >> app.pyComplete cycle:
git status # See the change
git add app.py # Stage
git commit -m "Final update" # Commit
git push # Share on GitHubCheck on GitHub: Is your change visible?
Next step: Learn branches to collaborate as a team.