码迷,mamicode.com
首页 > 其他好文 > 详细

Git 如何把master的内容更新到分支

时间:2018-03-16 13:32:40      阅读:958      评论:0      收藏:0      [点我收藏+]

标签:mode   request   blog   except   fun   you   span   java   extra   

Background:

  当有人对master进行更新之后,你想让已经创建的分支内容更新到master的最新状态,

bpan@5CG7022BM2 MINGW64 /d/GitRep/JIRA_Extensions (master)
$ git checkout 20180315  //切换到分支下
Switched to branch 20180315
Your branch is behind origin/master by 17 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)

bpan@5CG7022BM2 MINGW64 /d/GitRep/JIRA_Extensions (20180315)
$ git merge master  //合并master到分支,
Updating cee69ca..8b0ec9a
Fast-forward
 .gitignore                                         |   2 +
 .../functions/ExtractGroupMembersToExcelFile.java  | 225 +++++++++++++++++++++
 2 files changed, 227 insertions(+)
 create mode 100644 src/main/java/com/nokia/jira/functions/ExtractGroupMembersToExcelFile.java

bpan@5CG7022BM2 MINGW64 /d/GitRep/JIRA_Extensions (20180315)
$ git status
On branch 20180315
Your branch is up-to-date with origin/master.
nothing to commit, working tree clean

bpan@5CG7022BM2 MINGW64 /d/GitRep/JIRA_Extensions (20180315)
$ git push origin 20180315  //push到远程分支
fatal: HttpRequestException encountered.
   An error occurred while sending the request.
Username for https://github.com: 962720900
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/962720900/JiraExtensionFunctions.git
   e713274..8b0ec9a  20180315 -> 20180315

 

Git 如何把master的内容更新到分支

标签:mode   request   blog   except   fun   you   span   java   extra   

原文地址:https://www.cnblogs.com/revel171226/p/8580369.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!