* how to check what your pulling down?
@ 2009-04-16 11:00 cantona
2009-04-16 11:07 ` Jeff King
2009-04-16 16:46 ` Junio C Hamano
0 siblings, 2 replies; 4+ messages in thread
From: cantona @ 2009-04-16 11:00 UTC (permalink / raw)
To: git
Hi
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?". Is there a git command to check what
will come down with the next pull? If not, a command that will tell you
which local files differ from the git repository files?
Thanks
--
View this message in context: http://www.nabble.com/how-to-check-what-your-pulling-down--tp23075475p23075475.html
Sent from the git mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: how to check what your pulling down?
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
1 sibling, 0 replies; 4+ messages in thread
From: Jeff King @ 2009-04-16 11:07 UTC (permalink / raw)
To: cantona; +Cc: git
On Thu, Apr 16, 2009 at 04:00:08AM -0700, cantona wrote:
> My question: before I pull down I always get that bad feeling... "what am i
> gunna get? will there be a conflict?". Is there a git command to check what
> will come down with the next pull? If not, a command that will tell you
> which local files differ from the git repository files?
Pull is just fetch+merge, so you can do:
$ git fetch $remote
$ git log ..$remote/$branch
to see how they differ from you. And then "git merge $remote/$branch" if
you like it.
-Peff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: how to check what your pulling down?
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
2009-04-16 17:03 ` Matthieu Moy
1 sibling, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2009-04-16 16:46 UTC (permalink / raw)
To: cantona; +Cc: git
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..
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: how to check what your pulling down?
2009-04-16 16:46 ` Junio C Hamano
@ 2009-04-16 17:03 ` Matthieu Moy
0 siblings, 0 replies; 4+ messages in thread
From: Matthieu Moy @ 2009-04-16 17:03 UTC (permalink / raw)
To: Junio C Hamano; +Cc: cantona, git
Junio C Hamano <gitster@pobox.com> writes:
> 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.
But still, if you want to know what's new without touching your work
at all, "git fetch" is your friend: it fetches new commits from
another repository, without merging them with your branches. Running
"gitk --all" right after a "git fetch" should help understanding what
it did.
--
Matthieu
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-16 17:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2009-04-16 17:03 ` Matthieu Moy
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).