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 所表示的提交记录哈希值的前几位。

posted on 2020-05-23 19:07  码农-编程小子  阅读(91)  评论(0编辑  收藏  举报