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


使用
  
  
  
          
  1. git status
命令可以得到以下結果
   
   
   
           
  1. $ git status
  2. On branch dev_getTicketCnt
  3. Your branch is ahead of 'origin/master' by 1 commit.
  4. (use "git push" to publish your local commits)
  5. nothing to commit, working directory clean
這就表示本地庫還有沒push的內容
如果是以下結果,就表示本地全部都push了,同時表示本地還不是最新的,提示那里都提示你要去遠程拿代碼合並了
   
   
   
           
  1. $ git status
  2. On branch dev_activit_grabTicket
  3. Your branch and 'origin/master' have diverged,
  4. and have 1 and 4 different commits each, respectively.
  5. (use "git pull" to merge the remote branch into yours)
  6. nothing to commit, working directory clean

總結:其實git的每條命令之后都有很多提示的,從中可以學到很多其他操作





免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM