1. 程式人生 > >Git 如何把master的內容更新到分支

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

exc ati comm pre 更新 gin file nokia tps

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的內容更新到分支