git@vger.kernel.org mailing list mirror (one of many)
 help / Atom feed
* How to view diff when doing `git push --force`
@ 2017-03-11 14:52 KES
  2017-03-11 19:30 ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 3+ messages in thread
From: KES @ 2017-03-11 14:52 UTC (permalink / raw)
  To: git

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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to view diff when doing `git push --force`
  2017-03-11 14:52 How to view diff when doing `git push --force` KES
@ 2017-03-11 19:30 ` Ævar Arnfjörð Bjarmason
  2018-01-10 13:48   ` KES
  0 siblings, 1 reply; 3+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2017-03-11 19:30 UTC (permalink / raw)
  To: KES; +Cc: git

On Sat, Mar 11, 2017 at 3:52 PM, KES <kes-kes@yandex.ru> 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).

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to view diff when doing `git push --force`
  2017-03-11 19:30 ` Ævar Arnfjörð Bjarmason
@ 2018-01-10 13:48   ` KES
  0 siblings, 0 replies; 3+ messages in thread
From: KES @ 2018-01-10 13:48 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git

> 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).

Thank you.

But I have found next command to see what were changed. 
For example if someone did forced push and I wanna see changes before merge remote

git log --graph --decorate --pretty=oneline --abbrev-commit --cherry-mark --boundary --left-right

But is there an option to view changes in amended commits?

See the last code post about unknown option  in the next answer :
https://stackoverflow.com/a/48149931/4632019


If there is no such option. Will it be useful to have it?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-11 14:52 How to view diff when doing `git push --force` KES
2017-03-11 19:30 ` Ævar Arnfjörð Bjarmason
2018-01-10 13:48   ` KES

git@vger.kernel.org mailing list mirror (one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox