Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
cottrell committed Oct 24, 2023
1 parent 5b8b0de commit 17c492c
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 11 deletions.
8 changes: 5 additions & 3 deletions git_checkout_master_pull_all_submodules.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash -e
git pull # you forget this
# ugh
# master=$(git rev-parse --verify master 2>/dev/null 1>&2 && echo master || echo main)
# git submodule foreach --recursive 'git checkout master; git pull origin master:master; :'
git submodule foreach --recursive 'git checkout master; git pull origin master:master; :'
git submodule foreach --recursive '
branch=$(git rev-parse --verify master 2>/dev/null 1>&2 && echo master || echo main);
git checkout $branch;
git pull origin $branch:$branch;
'
7 changes: 6 additions & 1 deletion git_checkout_master_pull_all_submodules_parallel.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/bash -e
git pull &
git submodule foreach --recursive 'git checkout master; git pull origin master:master & :'
# git submodule foreach --recursive 'git checkout master; git pull origin master:master & :'
git submodule foreach --recursive '
branch=$(git rev-parse --verify master 2>/dev/null 1>&2 && echo master || echo main);
git checkout $branch;
git pull origin $branch:$branch & :
'
wait
12 changes: 9 additions & 3 deletions git_checkout_master_push_all_submodules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
# git submodule foreach --recursive 'git checkout master && git push origin master & :'

# debug, stop at first failure
git submodule foreach --recursive 'git checkout master && git push origin master'

git push origin master
# git submodule foreach --recursive 'git checkout master && git push origin master'
git submodule foreach --recursive '
branch=$(git rev-parse --verify master 2>/dev/null 1>&2 && echo master || echo main);
git checkout $branch;
git push origin $branch;
'
# branch=$(git rev-parse --verify master 2>/dev/null 1>&2 && echo master || echo main);
# git push origin $branch
git push origin
11 changes: 9 additions & 2 deletions git_checkout_master_push_all_submodules_parallel.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/bin/bash -e
git submodule foreach --recursive 'git checkout master && git push origin master & :'
git push origin master
# git submodule foreach --recursive 'git checkout master && git push origin master & :'
git submodule foreach --recursive '
branch=$(git rev-parse --verify master 2>/dev/null 1>&2 && echo master || echo main);
git checkout $branch;
git push origin $branch & :
'
# branch=$(git rev-parse --verify master 2>/dev/null 1>&2 && echo master || echo main);
# git push origin $branch
git push origin
wait
2 changes: 1 addition & 1 deletion my-gym
Submodule my-gym updated from 2c2f89 to fc75a8
2 changes: 1 addition & 1 deletion mybin
Submodule mybin updated 3 files
+5 −1 bbl
+2 −0 git_find_stash_dropped.bash
+1 −1 myhome

0 comments on commit 17c492c

Please sign in to comment.