Re: How to figure out what 'git push' would do?

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

 



Steffen Prohaska, Sun, Aug 05, 2007 13:37:34 +0200:
> How can I check what a 'git push' would do, without
> actually doing it?
> 
> Is there something like 'git push --dry-run', similar
> to 'rsync --dry-run'?

No. It is often safe to just do git-push, unless you have naive
developers doing pull every time some ref in your shared repo changes
*and* expecting the result to compile (typical for CVS way of work).
git-push will not overwrite anything, it always only forwards history.

For the case you really want to know what the changes on remote repo
will be it is possible to fetch them into the local repo first and
compare with what you will push:

    $ git fetch git://remote/path/REPO master:refs/remotes/REPO/master
    $ gitk local..REPO/master

It gives you all possible information, which may be worth that bit of
work. Or, if you have all the remote configuration ready, it can be
just:

    $ git fetch
    $ gitk local..REPO/master

-
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]

  Powered by Linux