X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=git-note.org;h=cd11c5ad72d084240b1af9ee78491beb1d31ea3d;hb=8da926e675e9ae3116442a19d3bdeb6f9edc42b0;hp=67f41e7c49ee397d008debbf961d64e26ecf0678;hpb=5a912b88fcfddbe3d91ceca9ed6d9c7b02a14ec1;p=blog.git diff --git a/git-note.org b/git-note.org index 67f41e7..cd11c5a 100644 --- a/git-note.org +++ b/git-note.org @@ -37,3 +37,24 @@ bad commit. In this case, we need to move the branch to another commit git branch -f branch-name COMMIT #+END_SRC +** Track local branch to remote branch +Sometime, we enter the issue =no upstream is configured for master=, It is because of local branch tracking is not configured +If you input ~git pull~, it hints the error +#+BEGIN_EXAMPLE + peli3@[~/Private/blog]>> git pull ±[••][master] + There is no tracking information for the current branch. + Please specify which branch you want to merge with. + See git-pull(1) for details. + + git pull + + If you wish to set tracking information for this branch you can do so with: + + git branch --set-upstream-to=origin/ master +#+END_EXAMPLE + +#+BEGIN_SRC sh :results output replace + git branch --set-upstream-to=origin/master master +#+END_SRC + +