美文网首页
gitlab常用命令

gitlab常用命令

作者: 张亚伦 | 来源:发表于2022-06-22 17:12 被阅读0次

    下载项目
    git clone xxxx

    添加修改文件
    git add xx or git add .

    提交本地仓库
    git commit -m "备注"

    推送至远程仓库
    git push

    从远程仓库更新
    git pull

    查看当前使用分支
    git branch

    查看远程所有分支
    git branch -r

    切换远程分支
    git checkout xxx

    子分支同步主分支

    #切换到分支xxx
    git checkout xxx        
    #同步主分支main的内容
    git merge main 或 git rebase main        
    #推送至远程仓库
    git push  或者git push -u origin xxx
    

    相关文章

      网友评论

          本文标题:gitlab常用命令

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