GitLab

作者: 小贤笔记 | 来源:发表于2018-07-20 09:28 被阅读3次

Git常用命令介绍

git init --初始化项目,刚开始初始化项目的时候使用
git clone --从服务器上克隆到本地,如果服务器上面已经有项目了,直接使用这个命令clone到本地进行使用。
git status --查看版本信息
git add --添加本地文件
git commit --提交更改
git push origin --tags 将更改推送到服务器

克隆远程git代码到本地仓库

  • 方法一(webstorm)


    image.png
    image.png
  • 方法二
    命令行:git clone 地址

切换分支

  • 方法一



    • 如果git branch不能显示所有分支, 依次输入以下命令
      • git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
      • git fetch --all
      • git pull --all
  • 方法二
    右键>TortoiseGit>Switch/Checkout...>Branch中选择分支>OK

404

  1. project>clean
  2. 右键下面的服务器> publish
  3. 重启 image.png

提交

  1. commit(更新本地缓存)
  2. push(提交到远程服务器)

合并分支

image.png

push报错

image.png

解决:先更新(pull),再提交(push)

相关文章

网友评论

    本文标题:GitLab

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