Git Operation_xmind

Git Operation

git

git cmd

  • git set up

    • git init --bare xxx.git
  • git clone

    • git clone ssh://userid@10.100.150.13/home/project/xxx.git
  • Git safety push procedure

    1. git add filename
      1a. git reset HEAD . //撤销git add
    2. git comment -m “comments”
    3. git pull
    4. git push
  • Git branch

    • Git branch status

      • git branch -a
    • switch branch

      • git checkout <branch_name>
    • new branch

      • git checkout -b dev
  • Tag

    • tag list

      • git tag
      • git tag -l
    • tag create

      • git tag -a <tag_name> -m “tag comments”
    • tag push

      • git push origin <tag_name>
      • git push origin --tags
    • switch to tag version

      • git checkout <tag_name>
    • revise from tag version

      • git checkout -b <branch_name> <tag_name>
    • tag delete

      • local: git tag -d <tag_name>
      • remote: git push origin --delete tag <tag_name>
  • get a single file

    • git checkout <branch_name> <file_name>
  • push to remote branch

    • git push origin <local_branch>:<remote_branch>
  • git log

    • latest commit with content diff

      • git log -n 1 --stat
  • git diff

    • git diff master origin/master //比较本地仓库 vs 远程仓库

git游戏

在这里插入图片描述


repo

repo note

  • repo related branch

  • log


gerrit

push to gerrit

  • git push origin HEAD:refs/for/master

XMind - Trial Version

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值