GitHub Learning Lab
官网https://lab.github.com/courseshtml
Git经常使用命令git
1 // git在本地建立仓库 2 git init 3 echo "Hello World!" > README.md 4 git add -A 5 git commit -m "my first commit" 6 // 而后去Github建立一个仓库"luren" 7 git remote add origin https://github.com/xiaoming/luren.git 8 git push -u origin master 9 10 11 // 若是远程仓库更新了而本地没同步,先pull再在本地解决冲突,以后merge 12 git pull origin master 13 git branch -a 14 git merge remotes/origin/master 15 git push -u origin master 16 17 // 若是提示refusing to merge unrelated histories(固然你得肯定是这个仓库) 18 git pull origin master --allow-unrelated-histories 19 20 // 若是提示 而你不想git修改你的文件,能够从全局关掉它 21 // 更多换行符设置详见https://www.hhcycj.com/post/item/264.html 22 git config --global core.autocrlf false 23 24 // git 推送代码到已有仓库 25 git add -A 26 git commit -m "add new Function" 27 git push -u origin master
Git客户端华为镜像源下载github
注:关于Github课程chrome
This branch has not been deployed
Review required
Merging is blocked
这个合并报错并不是操做失误,而是管理课程的人加了审核windows
因此必须仔细看,最好不要关掉这个页面 。第三节时会在Pull Requests和你继续教程内容缓存
Tips:在页面的chrome开发工具打开时 ,鼠标按住刷新键能够选择强制刷新模式(不使用缓存)安全
此外Git还有不少功能 ,如submodule能够定义手动同步上游模块。(微软最新的终端项目仓库就用了这个东西,节省了托管服务器带宽)服务器
附上安全解决git报错(push declined due to email privacy restrictions)hexo
git报错-->! [remote rejected] master -> master (push declined due to email privacy restrictions) - 小辉辉的博客 - CSDN博客
附上为本地代码新建仓库并推送本地代码到远程仓库:app
git-push到多个远程仓库,github,coding - mbinary - CSDN博客
GitHub 第一坑:换行符自动转换 [Windows用户必看]
Linux中apt与apt-get命令的区别与解释 - 系统极客
若是团队常常使用100M以上的单文件,建议看: Git LFS的使用
另外,关于获取指定commit的记录
有趣的用法:创建静态博客网站
·虽然是静态的,可是引用一些js以后,连目录检索和评论功能都能拥有