{"thread":{"id":"18896","subject":"how to check what your pulling down?","startedAt":"2009-04-16T11:00:08Z","lastAt":"2009-04-16T17:03:31Z","messageCount":4,"participants":["cantona","Jeff King","Junio C Hamano","Matthieu Moy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"111440","messageId":"23075475.post@talk.nabble.com","threadId":"18896","inReplyTo":null,"subject":"how to check what your pulling down?","fromName":"cantona","fromEmail":"adam@dwpub.com","sentAt":"2009-04-16T11:00:08Z","receivedAt":"2009-04-16T11:00:08Z","isPatch":false,"sender":{"key":"adam@dwpub.com","avatar":null},"body":"\nHi\n\nI've been using basic git for a while (add,comit,push,pull) and have\nrecently discovered stash,merge,branch :)\n\nMy question: before I pull down I always get that bad feeling... \"what am i\ngunna get? will there be a conflict?\". Is there a git command to check what\nwill come down with the next pull? If not, a command that will tell you\nwhich local files differ from the git repository files?\n\nThanks\n-- \nView this message in context: http://www.nabble.com/how-to-check-what-your-pulling-down--tp23075475p23075475.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"111441","messageId":"20090416110707.GA31915@coredump.intra.peff.net","threadId":"18896","inReplyTo":"23075475.post@talk.nabble.com","subject":"Re: how to check what your pulling down?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-04-16T11:07:07Z","receivedAt":"2009-04-16T11:07:07Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Apr 16, 2009 at 04:00:08AM -0700, cantona wrote:\n\n> My question: before I pull down I always get that bad feeling... \"what am i\n> gunna get? will there be a conflict?\". Is there a git command to check what\n> will come down with the next pull? If not, a command that will tell you\n> which local files differ from the git repository files?\n\nPull is just fetch+merge, so you can do:\n\n  $ git fetch $remote\n  $ git log ..$remote/$branch\n\nto see how they differ from you. And then \"git merge $remote/$branch\" if\nyou like it.\n\n-Peff\n"},{"id":"111456","messageId":"7vfxg8k0mk.fsf@gitster.siamese.dyndns.org","threadId":"18896","inReplyTo":"23075475.post@talk.nabble.com","subject":"Re: how to check what your pulling down?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-04-16T16:46:11Z","receivedAt":"2009-04-16T16:46:11Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"cantona <adam@dwpub.com> writes:\n\n> I've been using basic git for a while (add,comit,push,pull) and have\n> recently discovered stash,merge,branch :)\n>\n> My question: before I pull down I always get that bad feeling... \"what am i\n> gunna get? will there be a conflict?\".\n\n\"will there be a conflict?\" is an unfounded fear people seem to be unable\nto shake off from their old scm days.  As long as you start from a fully\ncommitted state, you can always \"git pull\", and if it resulted in\nconflicts you cannot resolve, you can \"git reset --hard\" it away.\n\nWith a distributed system, you can afford to fully commit your local\nchanges before you pull.  If they are of dubious quality, you just create\na separete \"my-wip\" branch to commit them there, come back to the \"master\"\nbranch that does not have unfinished changes and run \"pull\".\n\nOn the other hand, even if there weren't any conflicts, it is often good\nto check what you have pulled (especially if you are in the position to\nsay \"Nah, this is no good, and I am not going to pull from you now.\nPlease redo these changes.\"  You do that by by:\n\n\tgit pull\n        git log -p ORIG_HEAD..\n"},{"id":"111462","messageId":"vpq7i1kttss.fsf@bauges.imag.fr","threadId":"18896","inReplyTo":"7vfxg8k0mk.fsf@gitster.siamese.dyndns.org","subject":"Re: how to check what your pulling down?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2009-04-16T17:03:31Z","receivedAt":"2009-04-16T17:03:31Z","isPatch":false,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> cantona <adam@dwpub.com> writes:\n>\n>> I've been using basic git for a while (add,comit,push,pull) and have\n>> recently discovered stash,merge,branch :)\n>>\n>> My question: before I pull down I always get that bad feeling... \"what am i\n>> gunna get? will there be a conflict?\".\n>\n> \"will there be a conflict?\" is an unfounded fear people seem to be unable\n> to shake off from their old scm days.\n\nBut still, if you want to know what's new without touching your work\nat all, \"git fetch\" is your friend: it fetches new commits from\nanother repository, without merging them with your branches. Running\n\"gitk --all\" right after a \"git fetch\" should help understanding what\nit did.\n\n-- \nMatthieu\n"}]}