git cloneのno-checkoutオプション
man git-clone
--no-checkout, -n
No checkout of HEAD is performed after the clone is complete.
-nオプションを使うとclone後にcheckoutしなくなります。
例えば、こんなふうに。
Yamauchi:test yamauchi$ git clone -n https://github.com/torvalds/linux.git
Cloning into 'linux'...
remote: Counting objects: 4579986, done.
remote: Compressing objects: 100% (507/507), done.
remote: Total 4579986 (delta 473), reused 189 (delta 189), pack-reused 4579289
Receiving objects: 100% (4579986/4579986), 1.40 GiB | 2.01 MiB/s, done.
Resolving deltas: 100% (3776917/3776917), done.
Checking connectivity... done.
Yamauchi:test yamauchi$ ls -la
total 0
drwxr-xr-x 3 yamauchi staff 102 2 25 09:28 .
drwxr-xr-x 7 yamauchi staff 238 2 25 09:27 ..
drwxr-xr-x 3 yamauchi staff 102 2 25 09:28 linux
Yamauchi:test yamauchi$ cd linux/
Yamauchi:linux yamauchi$ ls -la
total 0
drwxr-xr-x 3 yamauchi staff 102 2 25 09:28 .
drwxr-xr-x 3 yamauchi staff 102 2 25 09:28 ..
drwxr-xr-x 12 yamauchi staff 408 2 25 09:48 .git
clone後、branchやtagを切り替えることが明確に分かる場合は、ちょっとだけ時間短縮に・・・。