zoukankan      html  css  js  c++  java
  • Git 常用笔记

    https://learngitbranching.js.org/

    1.设置别名

    git config --global alias.ch checkout
    git config --global alias.br branch
    git config --global alias.co commit
    git config --global alias.st status
    git config --global alias.me merge

    2.设置pull rebase

    git  config --global pull.rebase true

    设置完用 git config --list进行检验

    避免出现 "Merge branch 'master' of ..."

     git log --all --decorate --oneline --graph

    git修改已push的commit信息

    本条适用于修改已push的最新的commit信息,确保本地的文件是最新的。

    使用 git commit --amend 命令,(修改最近一次提交的注释信息),会进入到vim 编辑器

    编辑提交信息,保存退出(vim命令)

    git push -f 强制提交

    然后可以在git服务器上看到信息已被修改

     

    Git-创建tag到bitbucket

    1.进入代码仓库gds

    #git tag -a 1.0.0 -m "创建tag日志“

    #git push --tags

    04:19 25/12/2020
    https://learngitbranching.js.org/
    https://www.cnblogs.com/suihang/p/10594828.html#a4

    current branch bugFix
    git rebase master

    git cherry-pick
    git cherry-pick C2 C4
    交互式的 rebase
    --interactive 的 rebase 命令, 简写为 -i
    git rebase -i HEAD~4

    git tag <tagName> //创建本地tag
    git push origin <tagName> //推送到远程仓库
    若存在很多未推送的本地标签,你想一次全部推送的话:
    git push origin --tags
    git tag v1 C1


    Git Describe

    git describe <ref>

    <tag>_<numCommits>_g<hash>

    tag 表示的是离 ref 最近的标签, numCommits 是表示这个 ref 与 tag 相差有多少个提交记录, hash 表示的是你所给定的 ref 所表示的提交记录哈希值的前几位。

    人生旅途,边走边看...
  • 相关阅读:
    wps excel表格里的数字批量加10%
    隐藏BAT运行时黑框的vbs
    家庭宽带接入的几种方法
    内存拆装方法
    网线水晶头制作
    博客园 公告处添加头像
    H3C路由器地址池租期时间H3CMSR830-6BHI-WiNet
    网维大师重装备份文件
    网维大师重建B盘方法
    m4a转mp3的方法有哪些?一个快速转换音频的方法
  • 原文地址:https://www.cnblogs.com/dming4/p/12944013.html
Copyright © 2011-2022 走看看