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

论坛 期权论坛 编程之家     
选择匿名的用户   2021-6-2 20:54   1433   0

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

转载于:https://www.cnblogs.com/revel171226/p/8580369.html

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP