git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: cantona <adam@dwpub.com>
Cc: git@vger.kernel.org
Subject: Re: how to check what your pulling down?
Date: Thu, 16 Apr 2009 09:46:11 -0700	[thread overview]
Message-ID: <7vfxg8k0mk.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <23075475.post@talk.nabble.com> (adam@dwpub.com's message of "Thu, 16 Apr 2009 04:00:08 -0700 (PDT)")

cantona <adam@dwpub.com> writes:

> I've been using basic git for a while (add,comit,push,pull) and have
> recently discovered stash,merge,branch :)
>
> My question: before I pull down I always get that bad feeling... "what am i
> gunna get? will there be a conflict?".

"will there be a conflict?" is an unfounded fear people seem to be unable
to shake off from their old scm days.  As long as you start from a fully
committed state, you can always "git pull", and if it resulted in
conflicts you cannot resolve, you can "git reset --hard" it away.

With a distributed system, you can afford to fully commit your local
changes before you pull.  If they are of dubious quality, you just create
a separete "my-wip" branch to commit them there, come back to the "master"
branch that does not have unfinished changes and run "pull".

On the other hand, even if there weren't any conflicts, it is often good
to check what you have pulled (especially if you are in the position to
say "Nah, this is no good, and I am not going to pull from you now.
Please redo these changes."  You do that by by:

	git pull
        git log -p ORIG_HEAD..

  parent reply	other threads:[~2009-04-16 16:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-16 11:00 how to check what your pulling down? cantona
2009-04-16 11:07 ` Jeff King
2009-04-16 16:46 ` Junio C Hamano [this message]
2009-04-16 17:03   ` Matthieu Moy

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=7vfxg8k0mk.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=adam@dwpub.com \
    --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).