git作为程序的代码版本控制库,初用时一些命名略显生疏,普及一下gitee仓库容量500M,github容量1G,单文件最大都是50M
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| 1.git clone ....url
2.git status
3.git add * 4.git commit -m '这是我的第一次提交'
5.git push
6.git branch lanhan
7.git checkout laohan
8.push之前执行更新操作
9.git config --list
|
具有一个远程仓库(多人访问,多人共同维护一份代码)
1 2 3 4 5
| 本地仓库 git add 暂存区
git commit -m '' 工作区 git push 到远程
|
合并分支
进入主分支
1 2 3 4 5 6 7 8
| 1.进入主分支
2.合并主分支 git merge hanmy
git branch
|
1 2 3 4 5 6 7 8 9
| git branch xxx 新建分支 git checkout xxx 切换 分支
git checkout -b xxx 新建分支并进入新建分支
git merge xxx 当前分支合并分支
git pull 拉取仓库 git push 上传仓库
|
插件 gitlens
1 2 3 4 5 6 7 8 9 10 11 12 13
| 解决 fatal: Not a git repository (or any of the parent directories): .git 问题
然后关联远程或push 又出现了错误,如下
fatal: Not a git repository (or any of the parent directories): .git
提示说没有.git这样一个目录
在命令行 输入 git init 然后回车就好了
再重新执行添加文件的命令即可。 原文链接:https:
|
index 表示暂存区