Skip to content

Instantly share code, notes, and snippets.

@honux77
Created January 9, 2022 08:41
Show Gist options
  • Save honux77/96f7fbcf1716e4e8057884e714b3e36d to your computer and use it in GitHub Desktop.
Save honux77/96f7fbcf1716e4e8057884e714b3e36d to your computer and use it in GitHub Desktop.
Branch Generation from text file
#!/bin/bash
filename='user.txt'
repo='origin'
base='main'
i=0
while read user; do
echo "$i: $user"
((i = i + 1))
git branch $user $base
git push $repo $user
done < $filename
echo "Done!"
honux
crong
jk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment