ローカルで変更を確認する方法を知っています:
Get changes before commit :
git diff master
コミット後&&プッシュ前に変更を取得:
git diff origin/master
or
git diff remotes/origin/master
私が欲しいのは:
- リモート サーバーから最新バージョンを git clone します。たとえば、ローカル バージョンはv1です。
- リモート サーバーを別の側から変更します。たとえば、リモート バージョンはv2です (ローカル バージョンはまだ v1 です) 。
- リモートサーバーとの違いを取得
そして、次の手順でリモートサーバーの変更を取得する方法を知っています:
git remote foo git@github.com:user/foo.git
git fetch foo
git diff master foo/master
ただし、次のように、リモートサーバーの変更を確認するために 1 つのコマンドにエイリアスを設定したいと考えています。
git rdiff master
or something else
1 つのコメントでリモート サーバーの変更を取得することは可能ですか? ありがとう。
ところで、ローカルリポジトリにオリジンが取得されているのを見つけたのですが、再度取得せずに使用するにはどうすればよいでしょうか?
$ git remote -v
origin git@github.com:Marslo/VimConfig.git (fetch)
origin git@github.com:Marslo/VimConfig.git (push)