iakioの日記 RSSフィード

2008-09-19

branchとかmergeとか

| 00:22 | branchとかmergeとか - iakioの日記 を含むブックマーク はてなブックマーク - branchとかmergeとか - iakioの日記

というわけでgitを勉強する日記になりましたw。

cloneしてbranchを作って9/18のcteパッチを取り込んでみました。

本当はもっと色々ハマりながらやったので、実際とちょっと違うかもしれません。

そうそう、ハマりといえば、git-commit -aは変更したファイルに関してはgit-addgit-commitと同じだけど、新規追加したファイルを追加しくれるわけではないみたいなので、そういうのはgit-addしなきゃダメです。

#### 初期設定。~/.gitconfigを書き換えてるだけだと思う
% git-config --global user.name "my name"
% git-config --global user.email iakio@xxxxxxxxxxx
% cat ~/.gitconfig
[user]
        name = "my name"
        email = iakio@xxxxxxxxxxx

#### リポジトリのclone
% git clone http://git.postgresql.org/git/postgresql.git 

#### 小一時間経過
% cd postgresql

#### branch作成
% git branch my-cte-branch
% git checkout my-cte-branch
% git branch
  master
* my-cte-branch

#### patch適用
% zcat ../../cte_0918.patch.gz | patch -p1
% git status
# On branch my-cte-branch
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#
#       modified:   doc/src/sgml/ref/select.sgml
#       modified:   src/backend/commands/explain.c
#       modified:   src/backend/executor/Makefile
...
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       doc/src/sgml/ref/select.sgml.orig
#       src/backend/commands/explain.c.orig
#       src/backend/executor/Makefile.orig
...
no changes added to commit (use "git add" and/or "git commit -a")

#### おっと、.origファイルが邪魔なので消します
% find . -name '*.orig' | xargs rm

% git status
# On branch my-cte-branch
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#
#       modified:   doc/src/sgml/ref/select.sgml
#       modified:   src/backend/commands/explain.c
#       modified:   src/backend/executor/Makefile
...
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       src/backend/executor/nodeRecursion.c
#       src/backend/executor/nodeRecursivescan.c
#       src/backend/parser/parse_cte.c
#       src/include/executor/nodeRecursion.h
#       src/include/executor/nodeRecursivescan.h
#       src/include/parser/parse_cte.h
#       src/test/regress/expected/recursive.out
#       src/test/regress/sql/recursive.sql
no changes added to commit (use "git add" and/or "git commit -a")

#### よさそうなのでcommit
% git-add .
% git-commit

% git-status
# On branch my-cte-branch
nothing to commit (working directory clean)

#### とかやってる間に本家が更新されていたのでfetch。originに取り込まれる
% git-fetch
Getting alternates list for http://git.postgresql.org/git/postgresql.git
Getting pack list for http://git.postgresql.org/git/postgresql.git
Getting index for pack f40cd554307fb4e9747a6f12c72012f13e0e1659
Getting index for pack 2c57b19bc5ee96930b74040c45942700e345b171
Getting index for pack f8f3443cda277f3c05170eec7fc63952a3cfbe48
Getting index for pack ac5443ce09bf6bf3dd4d748ba011fb497ded6573
Getting pack ac5443ce09bf6bf3dd4d748ba011fb497ded6573
 which contains 78dc06d530a4f421b8d4a3ffc06c8e8bbeb2f2fa
walk 78dc06d530a4f421b8d4a3ffc06c8e8bbeb2f2fa
From http://git.postgresql.org/git/postgresql
   a278fc3..78dc06d  master     -> origin/master


#### 内容確認
% git-log master..origin/master
commit 78dc06d530a4f421b8d4a3ffc06c8e8bbeb2f2fa
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date:   Fri Sep 19 04:57:10 2008 +0000

    Optimize CleanupTempFiles by having a boolean flag that keeps track of wheth
    there are FD_XACT_TEMPORARY files to clean up at transaction end.

    Per performance profiling results on AWeber's huge systems.

    Patch by me after an idea suggested by Simon Riggs.

#### originをmerge
% git-merge origin
 src/backend/storage/file/fd.c |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

ThacicyncThacicync2018/02/15 18:46Order Levitra No Prescription Propecia El Corte Ingles <a href=http://tadalafbuy.com>cialis</a> Comprar Viagra Generico Andorra Viagra Livraison En 24h Fish Amoxicillin Same As Human Amoxicillin

EllCeafEllCeaf2018/04/19 09:42Zithromax Other Names Dth 24 B Kamal Kunj Mumbai India Kamagra Creditcard <a href=http://tadalaffbuy.com>cialis 5 mg</a> Depo Amoxicillin How To Get Samples Of Viagra

トラックバック - http://postgresql.g.hatena.ne.jp/iakio/20080919