工具笔记

有时候你会发现一些常用的小命令虽然简单却不是那么容易就拼写出来,说白了就是用的少
好记性不如烂笔头嘛,记下来呗。

Maven

  1. skip test 的命令:只是在后面加上参数 -Dmaven.test.skip=true

Git

  1. git 只checkout仓库中的子文件夹。 需要用到git的sparse checkout
    sparse checkout
    需要在本地设置git config,在pull之前确定需要pull的文件夹
  2. git display all remote branch
    git ls-remote --heads <remote-name>
    
  3. How to create orphan branches

    1
    2
    3
    4
    5
    git checkout --orphan config/services
    git rm -rf .
    git add <your files>
    git commit -m 'Initial commit'
    git push origin HEAD:refs/heads/config/services

    Source