Skip to content

Latest commit

 

History

History
32 lines (17 loc) · 817 Bytes

git-skills.md

File metadata and controls

32 lines (17 loc) · 817 Bytes

git skills

refs

content

squash merge

  • git squash merge keep version control history clean and readable
  • git commit --allow-empty -m 'it works!' blank commits to kick off workflow

subtree

  • git subtree add -P some/dir --squash http://url/some-repo.git remoteBranch 将项目中的某个子目录分离出来提交到新的 repo;

  • add/push/pull 添加/推送/拉去(类比 git 常规操作)

  • git subtree split -P some/dir -b newBranch 分离到新分支,可以将新分支提交到指定 repo

useful commons

  • git checkout -b new_branch 新建branch
  • git ls-files -v | grep ^h show files has “assume unchanged” bit set

git config

  • core.editor=code --wait
  • alias.fastci=commit -a --no-verify