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 submodule foreach 'git remote add example $(git remote get-url origin | sed " | ||
+ | |||
+ | Other | ||
+ | |||
+ | git submodule foreach 'git fetch --all' | ||
+ | git submodule foreach 'git branch -u zertrin/ | ||
+ | |||
+ | |||
+ | ===== Other ===== | ||
+ | |||
+ | Link to old tutorial in french [[git: |