From: Federico Mena Quintero <hidden> Date: 2016-06-15 22:43:35
Hi,
Here is the patchset I sent before, hopefully in a format more palatable
to the list.
The first three patches try to improve the documentation for git-branch
and git-checkout, adding docs for --track and --notrack to
git-branch.txt, and improving the ones that were in git-checkout.txt.
The last patch is for git-pull.sh; it gives the user a hint of what to
do when there's no branch configured to merge from.
Federico
@@ -24,7 +24,9 @@ and option `-a` shows both. In its second form, a new branch named <branchname> will be created. It will start out with a head equal to the one given as <start-point>. If no <start-point> is given, the branch will be created with a head-equal to that of the currently checked out branch.+equal to that of the currently checked out branch. Note that this+will create the new branch, but it will not switch the working tree to+it; use "git checkout <newbranch>" to switch to the new branch. When a local branch is started off a remote branch, git can setup the branch so that gitlink:git-pull[1] will appropriately merge from that
From: Federico Mena Quintero <hidden> Date: 2016-06-15 22:43:35
The docs for git-branch did not mention --track and --notrack in
the OPTIONS section.
Signed-off-by: Federico Mena Quintero <redacted>
---
Documentation/git-branch.txt | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
@@ -93,6 +93,20 @@ OPTIONS --no-abbrev:: Display the full sha1s in output listing rather than abbreviating them.+--track::+ Set up configuration so that git-pull will automatically+ retrieve data from the remote branch, otherwise you'll have to+ use "git pull <url>" explicitly. Set the+ branch.autosetupmerge configuration variable to true if you+ want git-checkout and git-branch to always behave as if+ '--track' were given.++--no-track::+ When -b is given and a branch is created off a remote branch,+ set up configuration so that git-pull will not retrieve data+ from the remote branch, ignoring the branch.autosetupmerge+ configuration variable.+ <branchname>:: The name of the branch to create or delete. The new branch name must pass all checks defined by
From: Federico Mena Quintero <hidden> Date: 2016-06-15 22:43:35
To be consistent with the git-branch docs.
Signed-off-by: Federico Mena Quintero <redacted>
---
Documentation/git-checkout.txt | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
@@ -50,7 +50,8 @@ OPTIONS --track:: When -b is given and a branch is created off a remote branch, set up configuration so that git-pull will automatically- retrieve data from the remote branch. Set the+ retrieve data from the remote branch, otherwise you'll have to+ use "git pull <url>" explicitly. Set the branch.autosetupmerge configuration variable to true if you want git-checkout and git-branch to always behave as if '--track' were given.
@@ -98,7 +98,11 @@ case "$merge_head" incurr_branch=${curr_branch#refs/heads/}echo>&2"Warning: No merge candidate found because value of config option-\"branch.${curr_branch}.merge\"doesnotmatchanyremotebranchfetched."+\"branch.${curr_branch}.merge\"doesnotmatchanyremotebranchfetched.+Thisbranchisnotsetuptotrackanyotherbranches.Pleasenamewhich+branchyouwanttomergefromonthecommandline,orifyoualmostalways+wanttomergefromthesamebranch,thensetthisupwith+\"gitbranch--track\"."echo>&2"No changes."exit0;;