Archive for the ‘git’ Category

 

git merge

10月 15th, 2012

master に戻してpullした。 $ git checkout master Switched to branch ‘master’ Your branch is behind ‘origin/master’ by 3 commits, and can be fast-forwarded. $ git pull @’s password: Updating 0197431..c4207d6 Fast-forward Data/Kyoto/Octo.php            |    1 + Data/Kyoto/Octo/Aucru/Item.php |    2 +- Web/Aucru/Script/Set.php       |    3 +++ 3 files […]

Read full article | コメントは受け付けていません。

git : mergeの設定が無いとき。 git branch –set-upstreamを使ってみる。

7月 25th, 2012

http://git-scm.com pro git は , サイトやpdf epubで無料公開されています。 Pro Git == 本題 == $ git remote add remote.server:/mygit 最初のcommit後にoriginにmasterをpush $ git push origin master Counting objects: 8, done. Delta compression using up to 3 threads. Compressing objects: 100% (6/6), done. Writing objects: 100% (8/8), 2.89 KiB, done. Total 8 (delta 0), reused 0 (delta 0) Unpacking […]

Read full article | コメントは受け付けていません。

git clone –shared repository | clone後のリポジトリーを共有する

4月 30th, 2012

git clone したリポジトリーを共有するには (例: usersグループに入っている人同士 同じグループで permission 775の時 git initだけの場合、他の人が書き込もうとするとエラー $ git add test fatal: Unable to create ‘/home/git/share_tmp/.git/index.lock': Permission denied shared=trueとする git init –shared=true .git/config [core]        repositoryformatversion = 0        filemode = true        bare = false        logallrefupdates = true        sharedrepository […]

Read full article | コメントは受け付けていません。

remove a remote branch | git

3月 13th, 2012

マージし終わって要らなくなったリモートのブランチを消してみる。 * git branch -r origin/HEAD -> origin/master origin/ebook origin/master * git branch -rd origin/ebook origin/HEAD -> origin/master origin/master ローカルのものを消すのは、 * git branch -d origin/ebook リモートに追加 * git push origin ebook

Read full article | コメントは受け付けていません。

既にコミットされているファイルを無視する gitignore ? update-index

2月 27th, 2012

To ignore uncommitted changes in a file that is already tracked use git update-index –assume-unchanged. ということで。既にトラックされているファイルを無視するには 例)既にコミットされている web/index.php の変更をコミットしたくない場合。 $ git status # On branch master # Changes not staged for commit: # (use “git add …” to update what will be committed) # (use “git checkout — …” to discard changes in working directory) […]

Read full article | コメントは受け付けていません。

.gitignore

2月 23rd, 2012

こんな状態で $ git status # On branch master # # Initial commit # # Untracked files: # (use “git add …” to include in what will be committed) # # .DS_Store # 512icon.png # android.tmp/ # android/ # android_release/ # icon.png # icon.xcf # icon72.png # icon72.xcf .gitignore ファイルを作成して以下のように記載すると .DS_Store *.tmp *.png !icon.png android_release *.pngは無視するけど、!icon.pngでicon.pngだけ無視しない。 […]

Read full article | コメントは受け付けていません。

resolv conflict when git stash pop | Git

12月 27th, 2011

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 […]

Read full article | コメントは受け付けていません。

Git Tag

8月 16th, 2011

$ git tag -a v1.0.4 -m ‘gr v1.0.4′ $ git tag v1.0.4 $ git show v1.0.4 tag v1.0.4 Tagger: 大竹 潤一 Date: Tue Aug 16 13:36:36 2011 +0900 gr v1.0.4 タグのpush $ git push origin v1.0.4 junichi@111.111.111.177’s password: Counting objects: 1, done. Writing objects: 100% (1/1), 188 bytes, done. Total 1 (delta 0), reused 0 […]

Read full article | コメントは受け付けていません。

Cygwin で Git

6月 3rd, 2011

gitをwindows上でも動かすために。cygwinをいれる。 http://www.cygwin.com/ cygwin.exeでインストールするときに git ssh をチェックしました。 cygwinを起動して。 $ mkdir git $ cd git で $ git clone 111.111.111.111:/home/jun/git/grTestBase grTestUse でローカルで出来ました。

Read full article | コメントは受け付けていません。

Git 複数個所の変更を選択して add

6月 2nd, 2011

2箇所離れている場所を変更して git add -pを利用すると変更箇所ごとに確認が出ます。 $ git add -p diff –git a/test.txt b/test.txt index 43eb1f4..63b004f 100644 — a/test.txt +++ b/test.txt @@ -1,6 +1,7 @@ test a -2 +b +30 3 4 x Stage this hunk [y,n,q,a,d,/,j,J,g,e,?]? y @@ -36,4 +37,5 @@ z 111 +99999 212 Stage this hunk [y,n,q,a,d,/,K,g,e,?]? n これで上の更新のみaddされます。 $ git diff diff –git […]

Read full article | コメントは受け付けていません。