git 檢查是否有commit到本地但還沒push的代碼

使用
  
  
  
  
git status
命令能夠獲得如下結果
   
   
   
   
$ git statusOn branch dev_getTicketCntYour branch is ahead of 'origin/master' by 1 commit. (use "git push" to publish your local commits)nothing to commit, working directory clean
這就表示本地庫還有沒push的內容
若是是如下結果,就表示本地所有都push了,同時表示本地還不是最新的,提示那裏都提示你要去遠程拿代碼合併了
   
   
   
   
$ git statusOn branch dev_activit_grabTicketYour branch and 'origin/master' have diverged,and have 1 and 4 different commits each, respectively. (use "git pull" to merge the remote branch into yours)nothing to commit, working directory clean

總結:其實git的每條命令以後都有不少提示的,從中能夠學到不少其餘操做


相關文章
相關標籤/搜索