mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <>
To: KES <>
Cc: git <>
Subject: Re: How to view diff when doing `git push --force`
Date: Sat, 11 Mar 2017 20:30:00 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Sat, Mar 11, 2017 at 3:52 PM, KES <> wrote:
> Hi. I have done `git push --force` but I forget to `pull`,
> Counting objects: 7, done.
> Delta compression using up to 4 threads.
> Compressing objects: 100% (7/7), done.
> Writing objects: 100% (7/7), 765 bytes | 0 bytes/s, done.
> Total 7 (delta 6), reused 0 (delta 0)
> To xxxgit:cry/cry.git
>  + 48e9058...117ee39 staging -> staging (forced update)
> But I can not view diff:
> git show 48e9058...117ee39
> fatal: ambiguous argument '48e9058...117ee39': unknown revision or path not in the working tree.
> Use '--' to separate paths from revisions, like this:
> 'git <command> [<revision>...] -- [<file>...]'
> May I pull info about changes that was deleted?

At this point, no, but in the future instead of --force use
--force-with-lease=<refname>:<expect> where <expect> is e.g. $(git
rev-parse HEAD).

  reply	other threads:[~2017-03-11 19:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-11 14:52 How to view diff when doing `git push --force` KES
2017-03-11 19:30 ` Ævar Arnfjörð Bjarmason [this message]
2018-01-10 13:48   ` KES

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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 read-only IMAP folder(s) and NNTP newsgroup(s).