Git常用合集

一、克隆远端分支到本地并建立映射(克隆哪个分支branch就是哪个)

  git clone -b <branch> 仓库的url

二、获取远端最新代码

  git fetch

三、拉取远端当前分支到本地分支(适用于多人开发一个分支)

  git pull

四、合并其他分支到当前所在分支(branch为远端分支的一个,和上面一个)

  git merge origin/<branch>

五、查看当前工作台状态

  git status

六、提交到暂存区

  git add .
  git commit -m "更新日志"

七、提交到远端分支

  git push


如果VSCode控制台用的好的话,上面的五六七用不到

所有评论(3)

  1. What’s up, after reading thuis awesome piece of writing i
    amm as welll glad to hare my know-how here with mates. https://W4I9O.Mssg.me/

  2. Quality content is the implortant to attract the visitors tto go
    to see the web page, that’s what this web site is providing. https://Fortune-glassi.Mystrikingly.com/

  3. Hi there! This is my 1st comment here so I just wanted to give a quick shout out and tell you I
    genuinely enjoy reading through your articles.
    Can you redcommend any other blogs/websites/forums that go over the samje subjects?
    Appreciate it! https://Prime-Jobs.ch/companies/tonebet-casino/

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注