User Tools

Site Tools


git

Differences

This shows you the differences between two versions of the page.


Previous revision
git [2020/04/29 14:19] (current) – recreated git page zertrin
Line 1: Line 1:
 +====== git ======
  
 +===== Useful submodule foreach commands =====
 +
 +List current HEAD commit in each submodule
 +
 +  git submodule foreach 'git rev-parse HEAD'
 +
 +List current checked-out branch in each submodule
 +
 +  git submodule foreach 'git rev-parse --abbrev-ref HEAD'
 +
 +Batch remote management in submodules
 +
 +  git submodule foreach 'git remote -v'
 +  git submodule foreach 'git remote set-url example ssh://git@gitea.example.org/EXAMPLE/$name.git'
 +  git submodule foreach 'git remote add example $(git remote get-url origin | sed "s/XXXX/YYYY/") || true'
 +
 +Other
 +
 +  git submodule foreach 'git fetch --all'
 +  git submodule foreach 'git branch -u zertrin/marc zertrin-gitea'
 +
 +
 +===== Other =====
 +
 +Link to old tutorial in french [[git:fr-tuto]]