LoginSignup
20
17

More than 5 years have passed since last update.

リモートリポジトリとカレントの差異を取得する

Last updated at Posted at 2014-02-21

現在の変更をきちんとpushしたかどうかを確認する方法

基本的には
git status コマンドで確認可能

console$ git status                                                                                     [/project 16:07]
# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
#   (use "git push" to publish your local commits)
#

push先のリポジトリよりも2コミット進んでいることが分かる。
pushを行った後、同じコマンドを実行する

console$ git status                                                                                     [/project 16:08]
# On branch master
nothing to commit, working directory clean

push先のリポジトリとローカルのリポジトリの状態が同じ状態となったことが分かる。

また、この状態で再びpushを行うと

Everything up-to-date

と出力される。

20
17
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
17