The short answer is βnoβ - or maybe even βno and yesβ if you read only the title of your question, but this is somewhat misleading.
A stretching script allows parameters, and many of them have interesting (and confusing and potentially very unattractive) effects.
, git pull
git fetch
, git merge
. 1pull
script fetch
. , git fetch origin br
, fetch
(origin
) br
"refspec". git predating 1.8.4 git fetch
, 1.8.4 br
origin/br
( , origin
).
, git fetch
refspec , 2 " ". , git fetch
( , origin
), git fetch origin
origin
, (1.8.4 ) git. ( git , pull
script .)
, origin/*
, pull
script git merge
. git , , " " 3 . , , master
, origin
master
, git git merge
, , , origin/master
( ).
: "refspec"
"refspec" , .
"refspec" , master:master
, develop:develop
..
, , :
. - , - , , .
: git push origin master:master
. " , , origin
-, , master
". HEAD
: git push origin HEAD:master
" , , origin
master
".
git fetch
, origin/
( ) , . master
, origin/master
. , git fetch origin master:origin/master
.. 4 git fetch origin master:master
, () , . 5
fetch
vs pull
. , " " refspec. - , master
. , : fetch
" master
, , SHA-1". push
" master
master
".
, git, git fetch
(, , ), fetch
, ( ) git FETCH_HEAD
. git git git fetch =
, , .
: git pull origin master branch
( )
git fetch
, ( git 1.8.4 ). git pull
, .
fetch
. merge
.
pull
script git merge
. git " ". , . .
git fetch
, , git merge
git rebase
. , .
1 git rebase
, . Rebasing , . : git fetch
, git rebase
git merge
, , git. , , , , .
2 , , fetch =
. origin
fetch = +refs/heads/*:refs/remotes/origin/*
, git, origin/whatever
.
3 " ", " ", - git pull
SHA-1, FETCH_HEAD
, git fetch
pull
script. origin
master origin/master
, origin/master
; branch.master.remote = origin
branch.master.merge = master
. git , origin/master
, - ; , script FETCH_HEAD
.
, , um, "", , git "".
4 , +
: " " , " " ", fetch =
. " force", , . fetch =
, , origin/something
*
.
5 , . git 30 . " " .