基本概念
fork:可以复制别人的仓库中的项目
star:收藏
pull request:发起请求,在fork中添加后可以发起请求更新代码。等待对方查看,对方觉得ok,可以合并。
watch:关注,可以看到别人的动态。看到项目的动态。
issue:事务卡片,发现bug可以讨论。
初始化设置
git config --global user.name "WangLiDong"
git config --global user.email "2388684549@qq.com"
git config --global color.ui auto
设置ssh key
ssh-keygen -t rsa -C ”2388684549@qq.com“
cat ~/.ssh/id_rsa.pub(root 用户在 /root/.ssh/id_rsa.pub)
通信
ssh -T git@github.com
复制仓库
git clone git@github.com:qqqw4549/hello-world.git
查看状态
git status
提交
git add test.php(文件加入暂存区)
git commit -m "add a php file"(提交命令)
git log(查看日志)
进行push
git push
git reflog #打印哈希值
git reset --hard 哈希值#