Git学习笔记与bug记录

注意:

Win7上版本号为Git for Windows 2.16.1(2)有以下这个bug

在Git Bash上执行pull时报错:

error: cannot spawn git: Function not implemented

目前解决方法是退回到上一个版本。
 
1. 安装git
2. git --version 查看版本信息,确认安装成功
3. cd到当前文件夹下
4. git init 初始化本地git仓库
5. 配置用户信息
6. git config --global user.name ''
7. git config --global user.email ''
8. git add <file> 添加文件(index.html,*.html,.)
9. git rm --cached <file> 删除文件
10. git status 查看状态
11. git commit -m "message" 提交
12. git push 推送到仓库
13. git pull 从远程仓库拉取数据
14. git clone github中复制的url 从远程仓库拷贝数据
15. 在.gitignore文件中写入要忽略的文件的路径
16. git branch 分支名 创建分支
17. git checkout 分支名 切换到分支(默认初始分支为master)
18. git merge 分支名 合并分支
19. 登陆github -> 点击+按钮 -> New repository -> 给新仓库起一个名字并创建
20. 复制"...or push an existing repository from the command line"中的代码,即上传到远程仓库
原文地址:https://www.cnblogs.com/crisis66/p/8433261.html