Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
GREEN='\033[0;32m';
NC='\033[0m';
nameFromConfig=`git config --global user.name`;
echo Enter your git name [$nameFromConfig]:
read name
if [ -z "$name" ]
then
name=${nameFromConfig}
#!/bin/bash
# pick only branch name
awk -F"\torigin/" '{print $NF}' branches.txt > branches_trancated.txt
# Make it a space seperated single line
awk '$1=$1' ORS=' ' branches_trancated.txt > branches_space.txt
# cleanup
rm -f branches.txt branches_trancated.txt