Re: how to check what your pulling down?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



cantona <adam@xxxxxxxxx> 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..

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]