不少朋友都反馈,Git太难用,难用得令人想放弃,但其实你刚接触互联网的时候也是这么想的,但是经过时间的洗礼,难得东西都会变得不难。
任何东西都有学习窍门,记住这82条Git使用技巧,你就会发现Git其实也没你想象的那么难,条理清晰,点击一键定位,快速查找记忆,背完才发现Git真香。
【文末有领取方式!!】
【文末有领取方式!!】
目录
内容展示
列出所有远程分支
-r 参数相当于:remote
git branch -r
重命名本地分支
git branch -m <new-branch-name>
删除远程标签
git push origin --delete tag <tagname>
以新增一个 commit 的方式还原某一个 commit 的修改
git revert <commit-id>
增加远程仓库
git remote add origin <remote-url>
清除 gitignore 文件中记录的文件
git clean -X -f
在 commit log 中显示 GPG 签名
git log --show-signature
clone 下来指定的单一分支
git clone -b <branch-name> --single-branch https://github.com/user/repo.git
【领取方式见下图!!】
注:资料来源于网络,侵删