Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Git quick reference for learners

A one-page reference of the Git and Composer commands a learner uses with Exponential - setting up clones, checking state, branching and committing, reading history, finding a breaking change, contributing through a…

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/help/students/git-quick-reference-for-learners.md

On this page

Git quick reference for learners

Every command on this page comes from Develop with Git or CONTRIBUTING.md unless another source is named. Print it or keep it next to your terminal. The explanations are in Using Git as a student.

Contents

  1. Setting up
  2. Where am I?
  3. Branching and committing
  4. Reading history
  5. Finding a breaking change
  6. Contributing through a fork
  7. Staying up to date
  8. When Composer refuses

Setting up

CommandDoes
composer config --global 'preferred-install.se7enxweb/*' sourceInstall every se7enxweb/* package as a Git clone
git clone https://github.com/se7enxweb/exponential.git exponentialGet the kernel with its full history
git switch -c my-siteStart your own branch on main
git switch -c my-site v6.0.14Start your own branch on a release tag instead
git tag -l 'v*' --sort=version:refnameList the release tags in version order
composer installClone the extensions into extension/<name>

Where am I?

CommandDoes
git statusChanged and untracked files
git diffThe changes, line by line
composer status -vPackages with uncommitted changes, unpushed commits or another version than the lock file
ls -d extension/*/.git | wc -lCount the extensions that are clones
git -C extension/<name> statusThe state of one extension ("HEAD detached at v..." is normal)

Branching and committing

CommandDoes
git switch -c <branch>A new branch from where you are
git add <file>Stage one file (by name, not everything at once)
git commit -m "Fixed: <what>"Commit with a subject in the project's style
git log --oneline -5Your last five commits

Subjects start with Added: , Updated: , Fixed: , Removed: or Renamed: .

Reading history

CommandDoes
git log --oneline -10 -- <file>The last ten changes to one file
git blame <file>Who last changed each line
git log -S "<text>" --onelineEvery commit that added or removed a piece of text
git -C extension/<name> log --oneline -3The newest commits of one extension

Finding a breaking change

git bisect start
git bisect bad
git bisect good v6.0.13
# test, then answer: git bisect good   or   git bisect bad
git bisect reset

Contributing through a fork

cd extension/<name>
git remote add fork https://github.com/<you>/<name>.git
git switch -c <fix-branch>
git commit -am "Fixed: <what>"
git push -u fork <fix-branch>
# then open the pull request from the link GitHub prints, or: gh pr create

While the pull request is open, when reviews ask for it:

git fetch origin
git rebase -i origin/main
git push --force-with-lease     # only to your own pull request branch

For the kernel: make hooks once, and make manifest-fix to keep share/filelist.md5 current.

Staying up to date

CommandDoes
git fetch origin --tags then git merge origin/mainBring the kernel up to date on your branch
composer updateThen the extensions to match
composer update se7enxweb/<package>One extension only

Git first, then Composer. The full routine: Update with Git.

When Composer refuses

Composer saysDo
... has uncommitted changes.Commit on a branch, or stash, update, and restore
... has unpushed changes on the current branchPush the branch to your fork, then update
You have version variations ...Expected while you work on a fix; composer update <package> returns to the tag
A package is still an archivecomposer reinstall <package>; never git clone by hand into it

Source: When Composer refuses.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x