北京城乡建设集团网站,浙江建设工程考试网站,枣庄企业网站推广,那些网站权重高1.git 存储永久凭据
git config --global credential.helper store
2.git 查询分支或标签的引用
git show-ref 【标签名|分支名】
3.git 搜索关键分支和tag
git tag -l *branch* --sortcommitterdate
4.git 删除标签
git tag -d v1.32 删除标签v1.32#xff0c;参数d…1.git 存储永久凭据
git config --global credential.helper store
2.git 查询分支或标签的引用
git show-ref 【标签名|分支名】
3.git 搜索关键分支和tag
git tag -l *branch* --sortcommitterdate
4.git 删除标签
git tag -d v1.32 删除标签v1.32参数d是delete的缩写。
5.git 给分支打标签
git tag v1.32 : 给当前分支打上【v1.32】标签
6.git 在tag上拉分支
git checkout -b sdh_1.0_develop refs/tags/sdh1.0
7.git 查询分支来源
git reflog show 分支名
8.git-代码回退
# 查看最近3个提交版本 git log -3 # 重置到想要回滚到的版本号。同时清空工作区、暂存区、repository区的新增变化代码 git reset --hard 61ea89bccc85badbe4c6c967870f3abe6a04b829 # 重置到想要回滚到的版本号。仅仅移动当前 Head 指针不会改变工作区和暂存区的内容 或 git reset --soft 61ea89bccc85badbe4c6c967870f3abe6a04b829 # 强制提交到git分支 git push -f origin master
9. git-修改分支名
https://blog.csdn.net/weixin_38629529/article/details/125359597
1、重命名分支 git branch -m oldBranch newBranch 注意如果修改的分支只是在本地还没有推送到远程只需要执行该操作即可。后面的操作步骤是针对已经推送到远程的分支。
2、删除远程分支 git push --delete origin oldBranch
3、上传新命名的本地分支 git push origin newBranch
4、本地分支与远程分支关联 git branch --set-upstream-to origin/newBranch
其中第3、4步命令也可以直接用下面的命令代替。 git push -u origin newBranch