Skip to content

Instantly share code, notes, and snippets.

@channainfo
Last active January 29, 2024 02:39
Show Gist options
  • Select an option

  • Save channainfo/bb0cb6bbee68dba1ef9710c1aeeaba1d to your computer and use it in GitHub Desktop.

Select an option

Save channainfo/bb0cb6bbee68dba1ef9710c1aeeaba1d to your computer and use it in GitHub Desktop.

Revisions

  1. channainfo renamed this gist Jan 29, 2024. 1 changed file with 0 additions and 0 deletions.
  2. channainfo revised this gist Jan 29, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # git branch -r list all branch from the remote repo
    # pipe the output to grep only branches start with 'automatic_translations'
    # echo the branch rename by removing the origin/
    # echo each branch_name stripping the prefix origin/
    # git push origin :{each_branch_name}

    git branch -r | fgrep origin/automatic_translations | while read x; do echo "deleting ${x/origin\//}"; git push origin ":${x/origin\//}"; done
  3. channainfo created this gist Jan 29, 2024.
    6 changes: 6 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    # git branch -r list all branch from the remote repo
    # pipe the output to grep only branches start with 'automatic_translations'
    # echo the branch rename by removing the origin/
    # git push origin :{each_branch_name}

    git branch -r | fgrep origin/automatic_translations | while read x; do echo "deleting ${x/origin\//}"; git push origin ":${x/origin\//}"; done