#git bot interface
History of !fetchfour
- Before 1.8.4, 'git fetch/pull' with a remote AND branch argument tended to be confusing because they didn't update the remote-tracking branch (the thing shown by 'git branch -r'). If you're stuck with an old version, it's usually better to pass no arguments, or at least only a remote. Workaround example to fetch only the 'foo' branch: git fetch origin refs/heads/foo:refs/remotes/origin/foo
By jast at 2019-01-02 14:02:11
- [pre 1.8.4 only] We recommend against using 'git fetch/pull <remote> <refspec>' (i.e. with branch argument), because it doesn't update the <remote>/<branch> ref. The easy way to fetch things properly is to get everything: 'git fetch' or 'git pull' are sufficient if you have one remote; otherwise we recommend 'git fetch <remote>' (plus 'git merge <remote>/<branch>' if you wanted to pull/merge).
By jast at 2014-03-18 17:14:04
- We recommend against using 'git fetch/pull <remote> <refspec>' (i.e. with branch argument), because it doesn't update the <remote>/<branch> ref. The easy way to fetch things properly is to get everything: 'git fetch' or 'git pull' are sufficient if you have one remote; otherwise we recommend 'git fetch <remote>' (plus 'git merge <remote>/<branch>' if you wanted to pull/merge).
By jast at 2013-05-07 12:33:24
- We recommend against using 'git fetch/pull <remote> <refspec>' (i.e. with branch argument), because it doesn't update the <remote>/<branch> ref. The easy way to fetch things properly is to get everything ('git fetch' or 'git pull' are sufficient in most cases). If you insist, though: git fetch <remote> refs/heads/<branch>:refs/remotes/<remote>/<branch>
By jast at 2013-05-07 12:30:59
- The four-word version of git-fetch and git-pull (e.g. git fetch <remote> <branch>) do *not* update the remote-tracking branches (<remote>/<branch>). This is confusing if you later look at <remote>/<branch> again. We recommend 'git fetch <remote>' instead, followed by 'git merge <remote>/<branch>' in the case of git-pull.
By charon at 2013-05-07 12:28:13
- Never use the four-word version of git-fetch or git-pull (e.g. git fetch <remote> <refspec>). It always ends in tears... unless you know what FETCH_HEAD is and want to have to deal with it. It's generally much easier to just fetch the whole remote ('git fetch <remote>') and change the fetch refspec in the config if you want to always fetch a particular set of branches only. Details: !fetch4why
By jast at 2013-05-07 12:25:14
- Never use the four-word version of git-fetch or git-pull (e.g. git fetch <remote> <refspec>). It always ends in tears. Yes, if you understand the implications of FETCH_HEAD it can technically be done, but really it is easier to just fetch the whole remote (or perhaps edit the fetchspec if you never want other bits). If you must, see !fetch4why
By ikke at 2012-12-10 09:49:03
- Never use the four-word version of git-fetch or git-pull (e.g. git fetch remote refspec). It always ends in tears. Yes, if you understand the implications of FETCH_HEAD it can technically be done, but really it is easier to just fetch the whole remote (or perhaps edit the fetchspec if you never want other bits). If you must, see !fetch4why
By frogonwheels at 2012-08-10 10:37:47
- Never use the four-word version of git-fetch or git-pull (e.g. git fetch remote refspec). It always ends in tears. Yes, if you understand the implications of FETCH_HEAD it can technically be done, but really it is easier to just fetch the whole remote (or perhaps edit the fetchspec if you never want other bits).
By jast at 2012-04-19 21:03:24
- Never use the four argument version of git-fetch or git-pull. It always ends in tears. Yes, if you understand the implications of FETCH_HEAD it can technically be done, but really it is easier to just fetch the whole remote (or perhaps edit the fetchspec if you never want other bits)
By SethRobertson at 2012-04-19 00:56:20