声明:小白对GitHub心里有朦胧的向往,提前窥探一下这世界的奥秘。
为了自己忘记的时候能瞅一眼,也是第一次写,写的乱也不够详细,欢迎指正,建议自行观看视频
视频地址1:Github 新手够用指南 | 全程演示&个人找项目技巧放送_哔哩哔哩_bilibili
视频地址2:40 分钟学会 Git | 日常开发全程大放送&搭配Github_哔哩哔哩_bilibili
GoGoCode 项目地址:https://github.com/thx/gogocode(求一个star!)
找开源项目的一些途径
• https://github.com/trending/
• https://github.com/521xueweihan/HelloGitHub
• https://github.com/ruanyf/weekly
• https://www.zhihu.com/column/mm-fe
特殊的查找资源小技巧-常用前缀后缀
• 找百科大全 awesome xxx
• 找例子 xxx sample
• 找空项目架子 xxx starter / xxx boilerplate
• 找教程 xxx tutorial
git clone+托管的地址+回车:下载仓库(已经初始化好的.git)
———————————————————————————————
———————————————————————————————
直接download zip下载的为文件夹,与git无关联则无法对其提交为概念进行更改增加,需要进行初始化
初始化:git init回车
—————————————————————————————————
___________________________________________________________
___________________________________________________________
例项目 GoGoCode的仓库 https://github.com/thx/gogocode/
搭配食用更佳的 Github 新手够用指南:Github 新手够用指南 | 全程演示&个人找项目技巧放送
软件下载地址:
https://gitforwindows.org/
https://code.visualstudio.com/
用到的命令:
克隆仓库:git clone <git地址>
初始化仓库:git init
添加文件到暂存区:git add -A
把暂存区的文件提交到仓库:git commit -m "提交信息"
查看提交的历史记录:git log --stat
工作区回滚:git checkout <filename>
撤销最后一次提交:git reset HEAD^1
以当前分支为基础新建分支:git checkout -b <branchname>
列举所有的分支:git branch
单纯地切换到某个分支:git checkout <branchname>
删掉特定的分支:git branch -D <branchname>
合并分支:git merge <branchname>
推送当前分支最新的提交到远程:git push
拉取远程分支最新的提交到本地:git pull
_______________________________________________________
______________________________________________________
简易方法
注意:这里powershell也可以使用,不一定非时bash
_________________________________________
_____________________________________________________________________________
简易方法:下载gitlens插件后,commits下拉栏内有之前提交的历史
_________________________________________
————————————————————————————————
git merge --abort 放弃合并
——————————————————————————