1 2 3 | 局域网:GitLab互联网:GitHub(外网)Gitee 码云(国内网站) |





合并后只会修改合并的分支

https://github.com/JiangKun0/xuexi.git


代码推送 push
-
git push 别名 分支
代码拉取 pull
-
git pull 别名 分支
代码克隆 Clone
-
git clone 地址
1、拉取代码
2、初始化本地仓库
3、创建别名
团队创建
会生成一个要请方:地址
将别人的代码插入到本地来
在C:\Users\邓江坤 下打开
ssh-keygen -t rsa -C 921253515@qq.com


Idea继承GitHub
忽略文件
创建XXX.ingnore(前缀建议是git.ignore)
.gitconfig
[user]
name=jiangkun
921253515@qq.com
[core]
excludesfile = XXX.ingnore的绝对路径
环境







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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | # 列出所有本地分支$ git branch# 列出所有远程分支$ git branch -r# 列出所有本地分支和远程分支$ git branch -a# 新建一个分支,但依然停留在当前分支$ git branch [branch-name]# 新建一个分支,并切换到该分支$ git checkout -b [branch]# 新建一个分支,指向指定commit$ git branch [branch] [commit]# 新建一个分支,与指定的远程分支建立追踪关系$ git branch --track [branch] [remote-branch]# 切换到指定分支,并更新工作区$ git checkout [branch-name]# 切换到上一个分支$ git checkout - # 建立追踪关系,在现有分支与指定的远程分支之间$ git branch --set-upstream [branch] [remote-branch]# 合并指定分支到当前分支$ git merge [branch]# 选择一个commit,合并进当前分支$ git cherry-pick [commit]# 删除分支$ git branch -d [branch-name]# 删除远程分支$ git push origin --delete [branch-name]$ git branch -dr [remote/branch]# 更新远程分支列表git remote update origin --prune |
Gitee码云
码云创建远程仓库
Idea集成Gitee码云
码云连接GitHub 进行代码的复制和迁移

GitLab
Gitlab服务器的搭建和部署

http://git/主机名/root/git-test.git




