Git Help

Indexes

syncing a fork

# fetch remote changes
git fetch upstream
git checkout master
# merge changes to master
git merge upstream/master

Clone

  • set depth --depth=14 只下载最近的 14 次 commits

Tag

  • git tag 列出已有标签
  • git tag v0.1 新建标签
  • git show v0.1 查看标签版本信息
  • git push origin v0.1 部署 v0.1 标签
  • git push origin --tags 部署所有本地标签
  • git tag -d v0.2 删除标签
  • git push origin :refs/tags/v0.2 应用删除操作

Merge

  • git cherry-pick d42c389f 合并指定的提交到当前分支

Published: January 04 2015

blog comments powered by Disqus