Git常用命令


Git 拉代码

git clone 地址

Git 合并分支 (B中新的内容合到A中)

分支A: git checkout 分支B

分支B: git pull

分支A: git merge 分支B

Git 打标签

git commit -m "msg"

git tag -a tagname -m "msg"  // 标签打在最新的commit上

git push origin master // 推送本地commit到远程仓库 (不会推送标签!)

git push origin --tags  // 推送本地标签到远程仓库

你可能感兴趣的:(Git常用命令)