新手学习git时遇到的问题
1.一打开gitbash就弹出错
- 始终用管理员模式打开gitbash
- 单击windows,搜索gitbash,右键选择属性,勾选以管理员身份运行此程序
-
2.github 查找资源技巧
- 找百科大全 awesome xxx
- 找例子 xxx sample
- 找空项目架子 xxx starter /xxx boilerplate
- 找教程 xxx tutorial
3.vscode终端是系统默认的,将其改为git终端
将终端改为git
在vscode中进行设置
4.分支相关命令
- 以当前分支为基础新建分支
git checkout -b <branchname>
- 列举所有分支
git branch
- 切换到某一分支
git checkout <branchname>
- 删除特定分支
git checkout -D <branchname>
- 合并分支
git merge <branchname>
5.git和github
- 推送
git push
- 拉取
git pull