[pgpool-hackers: 10] Re: Where can I commit code?

Tatsuo Ishii ishii at postgresql.org
Wed Dec 7 18:15:37 JST 2011


> Hi,
>> Hi,
>>
>>> Hi, every one.
>>>     Where can I commit new modified document now ? Old cvs or new git?
>>> Bambo Huang
>>
>> New git please.
> 
> Can anyone write a short document to tell me how to use git? I have a
> cvs account before, and what need I do now?

1) Get PostgreSQL community account. 
   http://www.postgresql.org/community/signup
   Upload ssh public keys. Wait for 15 minutes till git.postgresql.org receives them.

2) Clone git repository.

   git clone ssh://git@git.postgresql.org/pgpool2.git

3) Set git account preferences(replace my name/email with yours)

     git config branch.master.rebase true
     git config branch.autosetuprebase always
     git config user.name "Tatsuo Ishii"
     git config user.email ishii at postgresql.org
     git config --global user.name "Tatsuo Ishii"
     git config --global user.email ishii at postgresql.org

4) Obtain others updation periodically (like cvs update)

    git pull

5) Commit to master (CVS HEAD)

     git checkout master
     edit...
     git commit -a
     git push -dry-run (do nothing actually but you can see how it will go)
	 if ok, push
     git push

6) Commit to stable branches

     git checkout v3_1_stable
     edit...
     git commit -a
     git push

7) make sure where am i

     git branch
       v3_0_4
       v3_0_5
       v3_0_stable
     * v3_1_stable
       master

8) changing branches

         $ git checkout v3_1_stable
         switched to branch 'v3_1_stable'
         $ git status
         # on branch v3_1_stable
         # changes not staged for commit:
         #   (use "git add <file>..." to update what will be committed)
         #   (use "git checkout -- <file>..." to discard changes in working directory)
         #
         #	modified:   todo
         #
         no changes added to commit (use "git add" and/or "git commit -a")
         $ git stash
         saved working directory and index state wip on v3_1_stable: 2d48fa3 fix memory  leak in raw mode. this is essentially same as the fix made for 3.0.5 (commit 19a4ea9215da0b61728741fc0da2271958b09238).
         head is now at 2d48fa3 fix memory leak in raw mode. this is essentially same as the fix
         $ git checkout master
         switched to branch 'master'
         $ git checkout v3_1_stable
         switched to branch 'v3_1_stable'
         $ git stash pop
         # on branch v3_1_stable
         # changes not staged for commit:
         #   (use "git add <file>..." to update what will be committed)
         #   (use "git checkout -- <file>..." to discard changes in working directory)
         #
         #	modified:   todo
         #
         no changes added to commit (use "git add" and/or "git commit -a")
         dropped refs/stash@{0} (699920cdf26ee165f1df664e884d142ea1da3e6b)

9) Reset working directory to sync with master repository cause mine
   is badly confused

     git checkout master
     git reset --hard origin/master


10) Working with "topic branch"

	Create my branch

         git checkout -b fix/my_fix
         (or git branch fix/my_fix;git checkout fix/my_fix)

        Here I assume fix/... is for bug fix and feature/... for add functionality.

        トピックブランチを修正、コミットしたら、元のブランチに戻り、マージする
		Edit topic branch and commit. Then return to master and merge.

         git checkout master
         git merge fix/my_fix
         git push

	Remove unnecessary topic branch
 
         git branch -d fix/my_fix

11) References

        http://wiki.postgresql.org/wiki/Committing_with_Git
        http://wiki.postgresql.org/wiki/Working_with_Git


Hope this helps,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list