Skip to content

Commit e136b08

Browse files
committed
20170729补课内容
1 parent 31410bd commit e136b08

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed

WEEK1/BU/1.png

18.3 KB
Loading

WEEK1/BU/note.txt

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
https://github.com/:基于GIT操作的一个代码仓库(开源/免费) =>coding:https://coding.net/
2+
3+
GIT/SVN:团队协作,代码管理,项目版本控制
4+
-> GIT分布式
5+
-> SVN中央集中式
6+
7+
GIT
8+
本地仓库:开发、生成历史版本
9+
实现本地仓库和远程中央仓库的信息同步,团队协作开发的时候,大家可以在中央仓库中获取最新的项目代码
10+
11+
=============================
12+
$ git init ->在本地创建一个git仓库
13+
14+
git remote 系列操作可以完成本地和远程仓库之间的管理
15+
$ git remote -v 查看现有的链接
16+
17+
$ git remote add [名字(默认名字是origin)] [远程仓库地址]
18+
给本地仓库新加一个远程的链接,例如:$ git remote add origin https://github.com/zhouxiaotian/20170729.git (新增一个链接通道,名字是origin,链接是的zhouxiaotian/20170729.git这个远程仓库)
19+
20+
$ git remote rm [名字] 删除远程链接
21+
$ git remote update [名字] 更新远程链接通道
22+
23+
$ git pull origin master 从远程仓库中拉取最新的内容到本地仓库
24+
$ git push origin master 把本地仓库中的信息(代码和历史版本信息)同步(推送到)远程仓库中
25+
26+
=====================
27+
$ git clone [远程地址]
28+
->在本地创建一个仓库 $ git init
29+
->让本地新创的仓库和远程仓库保持连接 $ git remote add ...
30+
->把远程仓库中的内容拉取到本地 $ git pull origin master
31+
32+
=====================
33+
$ git add js/xxx.xx 把某一个文件放在暂存区
34+
$ git add .
35+
$ git add -A 把所有新修改(增加/删除)的内容放在暂存区
36+
37+
$ git commit -m'当前本次生成版本信息的描述(必须加)' 把暂存区中的所有内容生成一个历史版本
38+
39+
$ git status 查看当前所有未提交文件的状态
40+
->红色:工作区还没有提交到暂存区
41+
->绿色:暂存区还没有提交到历史区
42+
43+
44+
45+
46+
47+
48+
49+
50+
51+
52+
53+
54+
55+
56+
57+
58+
59+
60+
61+
62+
63+
64+
65+
66+
67+

0 commit comments

Comments
 (0)