美文网首页
GIT 使用帮助

GIT 使用帮助

作者: FX喂你袋盐 | 来源:发表于2017-11-13 21:45 被阅读13次

    master :主分支

    ---------------------------------------------------------

    初始化git仓库

    命令:git init

    查看仓库状态

    命令:git status

    添加到本地仓库

    命令:git commit -m " 该版本的信息"

    建立远程仓库链接

    命令:git remote add originhttps://github.com/1160007652/test.git

    提交到远程仓库

    命令:git push  origin master

    git push -u origin master

    拉取远程仓库到本地

    命令:git pull

    查看本地分支

    命令:git branch

    查看本地和远程分支

    命令:git branch -a

    创建分支

    命令:git branch

    使用:git branch news

    选中分支

    命令:git checkout

    使用:git checkout news

    合并分支

    命令:git merge news

    删除分支

    命令:git branch -d news

    删除远程的分支

    命令:git push origin --delete news

    创建并选择分支

    命令:git checkout -b news

    相关文章

      网友评论

          本文标题:GIT 使用帮助

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