Skip to content

Instantly share code, notes, and snippets.

@alash3al
Created May 21, 2018 10:38
Show Gist options
  • Save alash3al/398eb6ce2ca74a2ebbd29a9a191b6e6d to your computer and use it in GitHub Desktop.
Save alash3al/398eb6ce2ca74a2ebbd29a9a191b6e6d to your computer and use it in GitHub Desktop.
Merge Branch with Multiple branches at one command
#!/bin/bash
for branch in "$@"
do
echo -e "Checking out $branch ...\n"
git checkout $branch
echo -e "Merging from $1 into $branch ...\n"
git merge $1
echo -e "\n"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment