当前位置: 首页 > news >正文

南京最新疫情国内好的seo网站

南京最新疫情,国内好的seo网站,南京做网站哪家公司好,深圳网站建设的服务怎么样一、多人协作二 1.1多人协作 一般情况下,如果有多需求需要多人同时进行开发,是不会在一个分支上进行多人开发,而是一个需求或一个功能点就要创建一个feature 分支。 现在同时有两个需求需要你和你的小伙伴进行开发,那么你们俩便…

一、多人协作二

1.1多人协作

一般情况下,如果有多需求需要多人同时进行开发,是不会在一个分支上进行多人开发,而是一个需求或一个功能点就要创建一个feature 分支。
现在同时有两个需求需要你和你的小伙伴进行开发,那么你们俩便可以各自创建一个分支来完成自己的工作。在上个部分我们已经了解了可以从码云上直接创建远程分支,其实在本地创建的分支也可以通过推送的方式发送到远端。在这个部分我们就来用一下这种方式。

  • 对于你来说,可以进行以下操作:
# 新增本地分支 feature-1 并切换
hyb@139-159-150-152:~/git_teaching$ git branch
dev
* master
hyb@139-159-150-152:~/git_teaching$ git checkout -b feature-1
Switched to a new branch 'feature-1'
# 新增需求内容-创建function1文件
hyb@139-159-150-152:~/git_teaching$ vim function1
hyb@139-159-150-152:~/git_teaching$ cat function1
Done!
# 将 feature-1 分支推送到远端
hyb@139-159-150-152:~/git_teaching$ git add function1
hyb@139-159-150-152:~/git_teaching$ git commit -m"add function1"
[feature-1 12ed0db] add function1
1 file changed, 1 insertion(+)
create mode 100644 function1
hyb@139-159-150-152:~/git_teaching$ git push origin feature-1
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 270 bytes | 270.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Powered by GITEE.COM [GNK-6.4]
remote: Create a pull request for 'feature-1' on Gitee by visiting:
remote: https://gitee.com/hyb91/git_teaching/pull/new/hyb91:feature-1...hyb9
To gitee.com:hyb91/git_teaching.git
* [new branch] feature-1 -> feature-1
  • 对于小伙伴来说,可以进行以下操作:

此时,在本地,你看不见他新建的文档,他看不见你新建的文档。并且推送各自的分支时,并没有任何冲突,你俩互不影响,用起来很舒服!! 

再来看下远端码云上此时的状态:

对于你的 feature-1 分支: 对于小伙伴的 feature-2 分支: 

正常情况下,你俩就可以在自己的分支上进行专业的开发了!
但天有不测风云,你的小伙伴突然生病了,但需求还没开发完,需要你帮他继续开发,于是他便把
feature-2 分支名告诉你了。这时你就需要在自己的机器上切换到 feature-2 分支帮忙继续开发,要做的操作如下: 

# 必须先拉取远端仓库内容
hyb@139-159-150-152:~/git_teaching$ git pull
...
From gitee.com:hyb91/git_teaching
305f78a..72c5345 dev -> origin/dev
* [new branch] feature-2 -> origin/feature-2
...
# 可以看到远程已经有了feature-2
hyb@139-159-150-152:~/git_teaching$ git branch -a
dev
* feature-1
master
remotes/origin/HEAD -> origin/master
remotes/origin/dev
remotes/origin/feature-1
remotes/origin/feature-2
remotes/origin/master
# 切换到feature-2分支上,可以和远程的feature-2分支关联起来,
# 否则将来只使用 git push 推送内容会失败
hyb@139-159-150-152:~/git_teaching$ git checkout -b feature-2 origin/feature-2
Branch 'feature-2' set up to track remote branch 'feature-2' from 'origin'.
Switched to a new branch 'feature-2'
hyb@139-159-150-152:~/git_teaching$ ls
a.so b.ini file.txt function2 README.en.md README.md

切换成功后,便可以看见 feature-2 分支中的 function2 文件了,接着就可以帮小伙伴进行开发:

# 继续开发
hyb@139-159-150-152:~/git_teaching$ vim function2
hyb@139-159-150-152:~/git_teaching$ cat function2
Done!
Help done!
# 推送内容
hyb@139-159-150-152:~/git_teaching$ git add function2
hyb@139-159-150-152:~/git_teaching$ git commit -m"modify function2"
[feature-2 1079ae7] modify function2
1 file changed, 2 insertions(+), 1 deletion(-)
hyb@139-159-150-152:~/git_teaching$ git push origin feature-2
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 262 bytes | 262.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Powered by GITEE.COM [GNK-6.4]
To gitee.com:hyb91/git_teaching.git
e1233f1..1079ae7 feature-2 -> feature-2

查看远程状态,推送成功了:

这时,你的小伙伴已经修养的差不多,可以继续进行自己的开发工作,那么他首先要获取到你帮他开发的内容,然后接着你的代码继续开发。或者你已经帮他开发完了,那他也需要在自己的电脑上看看你帮他写的代码: 

Pull 无效的原因是小伙伴没有指定本地 feature-2 分支与远程 origin/feature-2 分支的链接,根据提
示,设置feature-2和origin/feature-2的链接即可:

 

目前,小伙伴的本地代码和远端保持严格一致。你和你的小伙伴可以继续在不同的分支下进行协同开发了。各自功能开发完毕后,不要忘记我们需要将代码合并到master中才算真正意义上的开发完毕。由于你的小伙伴率先开发完毕,于是开始 merge : 

此时远程仓库的状态: 

当你的小伙伴将其代码merge 到master 后,这是你也开发完成了,也需要进行 merge 到
master 操作,于是你:

# 切换至 master分支, pull 一下,保证本地的master是最新内容。
# 合并前这么做是一个好习惯
hyb@139-159-150-152:~/git_teaching$ git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
hyb@139-159-150-152:~/git_teaching$ git pull
From gitee.com:hyb91/git_teaching
72c5345..29006bd master -> origin/master
Updating 72c5345..29006bd
Fast-forward
function2 | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 function2
# 切换至 feature-1 分支, 合并 master 分支
# 这么做是因为如果有冲突,可以在feature-1分支上进行处理,而不是在在master上解决冲突。
# 这么做是一个好习惯
hyb@139-159-150-152:~/git_teaching$ git checkout feature-1
Switched to branch 'feature-1'
Your branch is up to date with 'origin/feature-1'.
hyb@139-159-150-152:~/git_teaching$ git merge master
Merge made by the 'recursive' strategy.
function2 | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 function2
hyb@139-159-150-152:~/git_teaching$ ls
a.so b.ini file.txt function1 function2 README.en.md README.md
# 1、由于feature-1分支已经merge进来了新内容,为了保证远程分支最新,所以最好push一下。
# 2、要 push 的另一个原因是因为在实际的开发中,master的merge操作一般不是由我们自己在本地进
# 其他人员或某些平台merge时,操作的肯定是远程分支,所以就要保证远程分支的最新。
# 3、如果 merge 出现冲突,不要忘记需要commit才可以push!!
hyb@139-159-150-152:~/git_teaching$ git status
On branch feature-1
Your branch is ahead of 'origin/feature-1' by 4 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
hyb@139-159-150-152:~/git_teaching$ git push origin feature-1
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 299 bytes | 299.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: Powered by GITEE.COM [GNK-6.4]
To gitee.com:hyb91/git_teaching.git
ea75a35..4b4c3d4 feature-1 -> feature-1
# 切换至 master 分支,合并 feature-1 分支
hyb@139-159-150-152:~/git_teaching$ git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
hyb@139-159-150-152:~/git_teaching$ git merge feature-1
Updating 29006bd..4b4c3d4
Fast-forward
function1 | 1 +
1 file changed, 1 insertion(+)
create mode 100644 function1
hyb@139-159-150-152:~/git_teaching$ ls
a.so b.ini file.txt function1 function2 README.en.md README.md
# 将 master 分支推送至远端
hyb@139-159-150-152:~/git_teaching$ git status
On branch master
Your branch is ahead of 'origin/master' by 3 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
hyb@139-159-150-152:~/git_teaching$ git push origin master
Total 0 (delta 0), reused 0 (delta 0)
remote: Powered by GITEE.COM [GNK-6.4]
To gitee.com:hyb91/git_teaching.git
29006bd..4b4c3d4 master -> master
hyb@139-159-150-152:~/git_teaching$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean

 此时远程仓库的状态:

此时, feature-1 和feature-2 分支对于我们来说就没用了, 那么我们可以直接在远程仓库中
将dev分支删除掉:

1.2远程分支删除后,本地 git branch -a 依然能看到的解决办法

当前我们已经删除了远程的几个分支,使用 git branch -a 命令可以查看所有本地分支和远程分
支,但发现很多在远程仓库已经删除的分支在本地依然可以看到。例如:

hyb@139-159-150-152:~/git_teaching$ git pull
Already up to date.
hyb@139-159-150-152:~/git_teaching$ git branch -a
dev
feature-1
feature-2
* master
remotes/origin/HEAD -> origin/master
remotes/origin/dev
remotes/origin/feature-1
remotes/origin/feature-2
remotes/origin/master

 使用命令 git remote show origin ,可以查看remote地址,远程分支,还有本地分支与之相
对应关系等信息。

hyb@139-159-150-152:~/git_teaching$ git remote show origin
* remote origin
Fetch URL: git@gitee.com:hyb91/git_teaching.git
Push URL: git@gitee.com:hyb91/git_teaching.git
HEAD branch: master
Remote branches:
master tracked
refs/remotes/origin/dev stale (use 'git remote prune' to remove)
refs/remotes/origin/feature-1 stale (use 'git remote prune' to remove)
refs/remotes/origin/feature-2 stale (use 'git remote prune' to remove)
Local branches configured for 'git pull':
dev merges with remote dev
feature-1 merges with remote feature-1
feature-2 merges with remote feature-2
master merges with remote master
Local ref configured for 'git push':
master pushes to master (up to date)

此时我们可以看到那些远程仓库已经不存在的分支,根据提示,使用 git remote prune
origin 命令:

hyb@139-159-150-152:~/git_teaching$ git remote prune origin
Pruning origin
URL: git@gitee.com:hyb91/git_teaching.git
* [pruned] origin/dev
* [pruned] origin/feature-1
* [pruned] origin/feature-2
hyb@139-159-150-152:~/git_teaching$ git branch -a
dev
feature-1
feature-2
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master

这样就删除了那些远程仓库不存在的分支。


文章转载自:
http://jotunheim.hjyw.cn
http://recumbent.hjyw.cn
http://bribe.hjyw.cn
http://multivalent.hjyw.cn
http://gemmologist.hjyw.cn
http://hague.hjyw.cn
http://intergovernmental.hjyw.cn
http://unorganized.hjyw.cn
http://homegrown.hjyw.cn
http://sabalo.hjyw.cn
http://kepler.hjyw.cn
http://formularize.hjyw.cn
http://enforce.hjyw.cn
http://mummy.hjyw.cn
http://chapter.hjyw.cn
http://comsymp.hjyw.cn
http://videocast.hjyw.cn
http://dermatozoon.hjyw.cn
http://or.hjyw.cn
http://recklinghausen.hjyw.cn
http://chalcophanite.hjyw.cn
http://turpentine.hjyw.cn
http://velocipede.hjyw.cn
http://bibliopole.hjyw.cn
http://dwight.hjyw.cn
http://louden.hjyw.cn
http://kanaka.hjyw.cn
http://ineducation.hjyw.cn
http://accouterment.hjyw.cn
http://hrip.hjyw.cn
http://densitometry.hjyw.cn
http://macula.hjyw.cn
http://bazooka.hjyw.cn
http://phlogosis.hjyw.cn
http://elevate.hjyw.cn
http://prevenient.hjyw.cn
http://municipally.hjyw.cn
http://scrape.hjyw.cn
http://mujik.hjyw.cn
http://misreckon.hjyw.cn
http://inductorium.hjyw.cn
http://catalyst.hjyw.cn
http://prepense.hjyw.cn
http://gardner.hjyw.cn
http://debarment.hjyw.cn
http://peloid.hjyw.cn
http://discourteousness.hjyw.cn
http://telluride.hjyw.cn
http://trichi.hjyw.cn
http://rehydration.hjyw.cn
http://concluding.hjyw.cn
http://sheristadar.hjyw.cn
http://inexplosive.hjyw.cn
http://burp.hjyw.cn
http://baganda.hjyw.cn
http://hemochrome.hjyw.cn
http://pedalfer.hjyw.cn
http://camptothecin.hjyw.cn
http://amplitude.hjyw.cn
http://inhuman.hjyw.cn
http://cornet.hjyw.cn
http://mongeese.hjyw.cn
http://packaging.hjyw.cn
http://laffer.hjyw.cn
http://sanitary.hjyw.cn
http://cardiocirculatory.hjyw.cn
http://scoticise.hjyw.cn
http://drama.hjyw.cn
http://pretone.hjyw.cn
http://midinette.hjyw.cn
http://genearch.hjyw.cn
http://aluminography.hjyw.cn
http://succussatory.hjyw.cn
http://rockaway.hjyw.cn
http://amalgamative.hjyw.cn
http://unpractical.hjyw.cn
http://fibrillous.hjyw.cn
http://cyanometry.hjyw.cn
http://reeducate.hjyw.cn
http://fulminatory.hjyw.cn
http://emeerate.hjyw.cn
http://arachis.hjyw.cn
http://duvetyn.hjyw.cn
http://prolapsus.hjyw.cn
http://punily.hjyw.cn
http://angostura.hjyw.cn
http://volcanogenic.hjyw.cn
http://diastema.hjyw.cn
http://maebashi.hjyw.cn
http://cno.hjyw.cn
http://maestoso.hjyw.cn
http://harvey.hjyw.cn
http://syllogistically.hjyw.cn
http://jubilee.hjyw.cn
http://unsanitary.hjyw.cn
http://hippodrome.hjyw.cn
http://shoal.hjyw.cn
http://pa.hjyw.cn
http://kbp.hjyw.cn
http://mergence.hjyw.cn
http://www.dt0577.cn/news/88934.html

相关文章:

  • 网站后台框架下载百度网址怎么输入?
  • 网站不推广如何排名网络营销策划书的范文
  • 个人网站开发技术要求广州seo公司品牌
  • 杭州做网站要多少钱网站推广专家十年乐云seo
  • 旅游网站开发目的网店代运营和推广销售
  • 崇左做网站公司域名注册查询软件
  • 检查部门网站建设重庆网站建设技术外包
  • 杭州做网站hzfwwl台州网站建设推广
  • 企业官网是什么网络优化工程师前景如何
  • 在网站图片源代码alt写入关键词后为什么不显示只显示title内容百度seo是啥意思
  • 长沙私人做网站东莞专业网站推广工具
  • a站免费最好看的电影片推荐seo俱乐部
  • 网站建设会计帐务处理百度指数分析报告案例
  • 成都科技网站建设电话咨询全网推广怎么做
  • 盘锦如何做百度的网站今天刚刚发生的重大新闻
  • WordPress添加下一篇seo关键词布局案例
  • wordpress建站案例视频网络营销专业学校排名
  • 网站 做 vga网络营销岗位职责和任职要求
  • 网站和公众号的区别是什么意思百度网盘登录入口官网
  • 网页ui设计师培训seo海外推广
  • 拓什么设计网站自媒体营销方式有哪些
  • wordpress购物分享主题苏州优化收费
  • 网站怎么做交易软文推广的100个范例
  • 西安响应式网站开发百度知道网页版地址
  • 图片分享功能网站开发免费html网站模板
  • 如何删除自己建的网站济南网站优化公司排名
  • 阿里云ecs服务器怎么建设网站云浮新增确诊病例30例
  • 杭州做网站多少钱做seo网页价格
  • 网站设计入门哪些平台可以发广告
  • 黄冈免费网站建设平台seo确定关键词