Skip to content

Instantly share code, notes, and snippets.

@stefanofiorentino
Created April 24, 2020 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanofiorentino/a37e953c0d8edf221b8bfa7a7e947ef1 to your computer and use it in GitHub Desktop.
Save stefanofiorentino/a37e953c0d8edf221b8bfa7a7e947ef1 to your computer and use it in GitHub Desktop.
push along with meaningful tags
#!/bin/bash
for dir in $(find . -maxdepth 1 ! -path . -type d);
do
cd $dir
find . -type d -name '.git*' ! -path "*/poky-tmp/*" 2>/dev/null | \
sed 's/\.git$//g' | \
xargs -I '{}' sh -c 'readlink -e {};' | \
uniq | \
sort | \
xargs -I '{}' sh -c 'cd {}; git push --follow-tags';
cd ..
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment