From: Shawn Pearce <spearce@spearce.org>
To: git@vger.kernel.org
Subject: Git user survey and `git pull`
Date: Thu, 21 Sep 2006 12:24:01 -0400 [thread overview]
Message-ID: <20060921162401.GD3934@spearce.org> (raw)
I just saw this comment under question 20:
git-pull's behavior of merging in the first refspec to the
current branch is very bad and has caused us serious repository
issues in xorg.
Most of the folks I've been teaching Git to recently have found `git
fetch` to be a very counterintuitive command for fetching things.
Especially since `git push` is what's used to send changes to
the remote repository. They also find `git pull . foo` as a
counterintuitive way to merge changes.
Basically I'm seeing users run `git pull` when they probably
should have run just `git fetch`; the pull obviously also merges
the first refspec in .git/remotes/origin to the current branch
and that's usually not what the user wanted, especially when the
upstream remote has several branches that the user may be tracking
(e.g. stable, dev, experimental).
I think its probably too late to change the UI[*1*] but I think
it is definately an issue for folks learning Git. Calling push
push, fetch fetch and fetch+merge pull is probably a design flaw.
IMHO it probably should have been something like:
Current Shoulda Been
--------------- ----------------
git-push git-push
git-fetch git-pull
git-pull . foo git-merge foo
git-pull git-pull --merge
git-merge git-merge-driver
in other words pull does the download and doesn't automatically
start a merge unless --merge was also given and git-merge is a
cleaner wrapper around the Grand Unified Merge Driver that makes
it easier to start a merge.
[*1*] I bet a lot of scripts are currently based on the core
Git Poreclain level functions. I try to avoid them myself
in scripts and go right to the plumbing but not everyone
does that.
--
Shawn.
next reply other threads:[~2006-09-21 16:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-21 16:24 Shawn Pearce [this message]
2006-09-21 16:40 ` Git user survey and `git pull` Petr Baudis
2006-09-21 17:38 ` Linus Torvalds
2006-09-21 18:05 ` Nicolas Pitre
2006-09-22 4:57 ` Junio C Hamano
2006-09-22 10:34 ` Santi
2006-09-22 19:08 ` Junio C Hamano
2006-09-22 23:24 ` Santi
2006-09-21 17:02 ` Nicolas Pitre
2006-09-21 17:09 ` Shawn Pearce
2006-09-21 17:12 ` Johannes Schindelin
2006-09-21 17:17 ` Jakub Narebski
2006-09-22 21:05 ` Matthias Urlichs
2006-09-23 11:51 ` Alan Chandler
2006-09-23 14:12 ` Johannes Schindelin
2006-09-23 8:54 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060921162401.GD3934@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).