Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] Documentation: update git-pull.txt for clone's new default behavior

From: J. Bruce Fields <hidden>
Date: 2016-06-15 22:42:47

On Sun, Dec 31, 2006 at 04:35:41PM -0800, Junio C Hamano wrote:
bfields@fieldses.org writes:
quoted
 git pull, git pull origin::
-	Fetch the default head from the repository you cloned
-	from and merge it into your current branch.
+	Update the remote tracking brances for the repository
+	you cloned from, then merge one of them into your
+	current branch.  Normally the branch merged in is
+	the HEAD of the remote repository, when your master
+	branch is checked out.  When on another branch,
+	the (alphabetically) first branch from the remote
+	repository is merged in.  These defaults can be modified
+	using the branch and remote sections of the repository
+	configuration; see gitlink:git-repo-config[1] for details.
I think documenting this is wrong.  At least we should say "do
not be lazy and say 'git pull' or 'git pull origin' without
configuring what branch you are interested in when on a branch
you created yourself".  Later, people can supply patches to make
that configuration easier.
Yeah, OK, I'll admit I felt silly writing that; so for now, how about
just omitting mention of the current behavior and saying instead
something like this?:

	"....  Normally the branch merged in is
	the HEAD of the remote repository, when your master
	branch is checked out.  For branches other than master,
	you can choose the default remote branch to merge using the
	branch.<name>.remote and branch.<name>.merge options; see
	gitlink:git-repo-config[1] for details."

--b.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help