Git & Project Submission
S7 Inf A3 — Java for Graphical and Mobile Programming
Stéphane Derrode — Centrale Lyon
A concise reference for versioning your lab projects with Git and packaging them for Moodle. If you already use Git in another course, skip straight to the
.gitignoreand Submission sections.
Why Git (30 seconds)
Version control gives your code save points and a history: you can undo, compare versions, and never lose work. For the graded projects (BE1, BE2) done in pairs, it lets both partners contribute and merge their work.
Install
| OS | Command / link |
|---|---|
| Windows | git-scm.com/download/win |
| macOS | brew install git (or install the Xcode Command Line Tools) |
| Linux | sudo apt install git |
Verify, then set your identity (once per machine):
git --version
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
Core workflow
cd my-project
git init # start tracking this folder (once)
git add . # stage all changes
git commit -m "TD4: control panel works"
# ... keep coding ...
git status # what changed?
git add .
git commit -m "Add JComboBox fleet selector"
git log --oneline # see your history
Commit small and often, with messages that say what you did.
.gitignore (important)
Never commit build artifacts — they are regenerated and bloat the repo. Create a .gitignore file at the project root.
Android Studio offers to generate a complete
.gitignorewhen you create the project — accept it.
Optional — a remote (GitHub / GitLab)
Handy for pair work. Keep coursework repositories private and check the school's policy before pushing.
Submitting on Moodle
The graded projects (BE1, BE2) are submitted as a zip, not as a Git repository.
- Clean the build artifacts first (smaller archive, no compiled files):
- Maven:
mvn clean(removestarget/) - Android: Build ▸ Clean Project
- Maven:
- Zip the project folder.
- Name it exactly:
BE1_NomPrenom1_NomPrenom2.zipBE2_NomPrenom1_NomPrenom2.zip
- Put the PDF report inside the zip (see each project brief).
- Upload to Moodle before the deadline.
Tip: if you used Git,
git archive -o BE1_Dupont_Martin.zip HEADproduces a clean zip of exactly the tracked files — notarget/, no.git.