Skip to content

Instantly share code, notes, and snippets.

@sfilyh
Last active March 6, 2021 13:13
Show Gist options
  • Select an option

  • Save sfilyh/d8c1aa186b2f4f4af3f08d02d76ef445 to your computer and use it in GitHub Desktop.

Select an option

Save sfilyh/d8c1aa186b2f4f4af3f08d02d76ef445 to your computer and use it in GitHub Desktop.
git 多分支切换脚本
#!/bin/bash
BRANCH_NAME=$1
SRC_DIR="/Users/user/poject/all_branch/${BRANCH_NAME}"
echo $SRC_DIR
if [ ! -d $SRC_DIR ];then
git clone https://github.com/sdemo/sdemo.git $SRC_DIR
fi
cd $SRC_DIR
git checkout $BRANCH_NAME
open $SRC_DIR -a 'IntelliJ IDEA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment