git 技巧

  • git clone 时直接提交用户名和密码
    git clone https://用户名:密码@地址
    当用户名中包含 @ 字符时, 使用 %40 来替换 @
    例如:
    git clone https://994853041%40qq.com:123456@https://github.com/lihengming/spring-boot-api-project-seed.git

  • git clone 时指定版本
    git clone -b 版本 地址
    例如:
    git clone -b master https://github.com/lihengming/spring-boot-api-project-seed.git

  • git clone 时指定保存的位置
    git clone 地址 "保存的位置"
    例如:
    git clone https://github.com/lihengming/spring-boot-api-project-seed.git "D:/Project/spring-boot"

你可能感兴趣的:(git 技巧)