美文网首页
git 常用命令

git 常用命令

作者: 客舟求简 | 来源:发表于2017-12-05 20:52 被阅读8次

    查看远程分支

    git remote -v
    

    导出代码

    $git archive --format zip --output "./output.zip" master -0
    

    新建分支

    // 创建并切换到新分支
    $git checkout -b  branchName  
    // 提交该分支到远程仓库
    $git push origin branchName
    // 本地分支与远程分支进行关联
    git branch --set-upstream-to=origin/branchName branchName
    

    对上一次的提交做修改

    git commit --amend
    

    相关文章

      网友评论

          本文标题:git 常用命令

          本文链接:https://www.haomeiwen.com/subject/hchhixtx.html