# GitLibs **Repository Path**: chrysler600c/git-libs ## Basic Information - **Project Name**: GitLibs - **Description**: 常用libs - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-05-21 - **Last Updated**: 2026-01-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # GitLibs #### 介绍 常用libs #### 软件架构 软件架构说明 #### 安装教程 Add it in your root build.gradle at the end of repositories: allprojects { repositories { ... maven { url 'https://jitpack.io' } } } Step 2. Add the dependency dependencies { implementation 'com.gitee.chrysler600c:git-libs:v1.0.0' } [![](https://jitpack.io/v/com.gitee.chrysler600c/git-libs.svg)](https://jitpack.io/#com.gitee.chrysler600c/git-libs) #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) #### GitFAQ ==================================================== #### 错误修复 1. fatal: unable to access 'https://github.com/xxx.git/': Unknown SSL protocol error in connection to github.com:443 解决:git config http.sslVerify "false" #### Git常用命令 1. 回退代码: git reset --hard commit_id 2. 强制提交回退后的代码: git push origin HEAD --force #### Git打标签 1. 列出已有标签:git tag (可带上可选的 -l 选项 --list) 2. 创建附注标签: $ git tag -a v1.4 -m "my version 1.4" 3. 推送标签到服务器: $ git push origin v1.5 4. 重新设置地址: git remote set-url origin http://gc.xxxx.cn:3000/xxxx/xxxx.git #### 关联本地代码到远程仓库 1. git init //初始化仓库 2. git remote add origin http://xxxxxxx.git //链接远程仓库,创建主分支 3. git pull origin master //拉取远程代码 4. git push -u origin master //提交本地代码/IDE提交 #### 将旧的 .git 仓库(包含完整历史记录)上传到新的 Git 地址 1 查看当前关联的远程仓库 git remote -v 2 移除旧的远程地址(通常默认名为 origin) git remote rm origin 3 添加新的远程仓库(origin 是默认名称,可自定义) git remote add origin <新的Git地址> 4 推送主分支(如 main 或 master)git push -u origin main 若分支名为 master,替换为 git push -u origin master 推送所有分支(包括其他分支的历史记录)git push --all origin 推送所有标签(如果有标签需要同步)git push --tags origin