resolv conflict when git stash pop | Git

conflictしたので、mergeしてみる。

git stash
git pull
したら、conflictと出たので
該当ファイルはこんな感じに。

<<<<<<< Updated upstream
  protected static $lang_codes;
  public static function initLangCodes(){
    if(empty($lang_codes))
      self::$lang_codes = array( 'en','ja','cn','fr' );
  }
  public static function getLangCodes(){
    self::initLangCodes();
    return self::$lang_codes;
  }
  public static function checkLangCode($code){
    self::initLangCodes();
    return in_array( $code, self::$lang_codes );
  }
=======
  protected $lang;
  protected $locale;

  public static $langs = null;
  public static function getLangname( $code ) {
    if( !self::$langs ){
      self::$langs = array( 'en'=>'English','ja'=>'日本語' );
    }
    if( isset( self::$langs[$code] ) ){
      return self::$langs[$code];
    }
    return 'other';
  }

>>>>>> Stashed changes

となっているところを修正して、コミット。

$git add mergedfilename
$git commit -a -m”merged commit”

stashには、まだ残っているので、問題なければ消す。

$ git stash list
stash@{0}: WIP on master: 282d981 merged commit
stash@{1}: WIP on master: 898897d added source api
$ git stash drop stash@{1}
Dropped stash@{1} (d60195305e7ff4c00a59eab4de0cc8f4e0eff168)
$ git stash list
stash@{0}: WIP on master: 282d981 merge and update
$ git stash clear
$ git stash list

dropは一つ消す。clearは全部消す。

This entry was posted on 火曜日, 12月 27th, 2011 at 4:28 PM and is filed under git. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。