I have this:
git clone --depth=1 app
cd app
git fetch origin
git checkout a119b1076dd45a88a3609c4f7893ef3d82f9a4ee
but it says:
A shallow clone is also, by default, a single-branch clone:
--depth
Create a shallow clone with a history truncated to the specified number of commits. Implies--single-branch
unless ...
A single-branch clone is just what it says: a clone that copies only one branch from the upstream. (The underlying mechanism is via the default fetch
refspecs, so you can temporarily override this for one fetch by supplying refspecs.)
If you want a shallow clone to copy more than one branch, you must convert it to a non-single-branch clone, or start it out as a non-single-branch clone. To start out as one, keep reading the rest of the quoted sentence. To change an existing single-branch clone to a two, three, or all-branch clone, see How do I "undo" a --single-branch clone?