git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: how to check what your pulling down?

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 16, 2009, 16:46 UTC
Message-ID
<7vfxg8k0mk.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<23075475.post@talk.nabble.com>
cantona <adam@dwpub.com> writes:
Show 5 quoted lines
> 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..
Previous: Jeff KingNext: Matthieu Moy
Message 3 of 4 in “how to check what your pulling down?”
  1. cantonaApr 16, 2009
  2. Jeff KingApr 16, 2009
  3. Junio C HamanoApr 16, 2009
  4. Matthieu MoyApr 16, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.