Git操作汇总

git

标签Tag

git tag // 列出现有的tags

git tag -a v0.4 -m ‘version 0.4’ //本地打tag

git push –tags //提交tag到server

git push origin :refs/tags/标签名 //删除远程tag

git tag -d 标签名 //删除本地tag

分支Branch

git fetch -p origin //刷新远程分支列表

git log —graph —all //图形化分支

配置

git config -e [–local]

配置版本库级别的配置文件 project/.git/config (优先级最高)

git config -e –global

配置全局配置文件(用户主目录下)~/.gitconfig

git config -e –system

配置系统级配置文件 /etc/gitconfig (优先级最低)

git config –list 查看当前git配置

git config user.name xxx

git config user.email xxx@xxx.com

作者

ovasty

发布于

2021-02-02

更新于

2021-02-12

许可协议

评论

You forgot to set the shortname for Disqus. Please set it in _config.yml.