#author("2023-12-10T15:10:21+00:00","default:iseki","iseki")
#author("2025-04-06T10:30:13+00:00","default:iseki","iseki")
* git [#n160aa29]
** Overview [#r9b285e8]
- 分散型バージョン管理システム
- GitHub https://github.com


** Link [#a0d9a723]
- http://kernel.org/pub/software/scm/git/


** Compile [#z29a6882]
 # ./configure
 # make 
 # make install



** Commands [#edf0115c]
*** リポジトリ [#oe14e730]
**** 任意のブランチをクローン [#n29bb4c4]
- git clone URL -b ブランチ名
**** 任意のタグにチェックアウトする. [#t26115e8]
- git checkout -b ブランチ名 タグ名

**** リポジトリの情報 [#k66683af]
- git remote -v
*** タグ [#wd31955c]
**** タグを付ける [#mb228678]
- git tag タグ名
**** タグ情報を push [#ud6d8885]
- git push origin  タグ名
**** タグの削除 [#y01bab87]
- Local: git tag -d v4.0.2
- remote: git push origin :tags/v4.0.2
** svn to git [#fa6602c3]
- リポジトリのコピー
 git clone git://opensimulator.org/git/opensim opensim_git_orig
 cp -Rpd opensim_git_orig opensim_git

- git ブランチと移動作成
 git branch r####
 git checkout r####

- ブランチの変更をコミット & プッシュ
 git commit -a -m "message"
 git push


** Operations [#xd141d97]
*** ETC. [#v1db9ca4]
+ $ git show --name-status   で UUID を覚える.
+ $ git pull
+ $ git log <1でのUUID>... --name-status
+ $ git remote -v   git の情報

*** masterブランチを保持しつつ,他のブランチに対して作業(パッチなど)を行う場合. [#o7e7db07]
+ git pull        masterブランチの更新
+ git branch XXX     ブランチXXX の作成
+ git checkout XXX    ブランチXXX へ移動
+ XXXブランチで作業
+ git commit -a -m "any comment"
+ git checkout master
+ 1へ戻る




** for MS Windows [#xd3662ee]

**** msysgit  (CUI of Linux) [#d2fc82db]
- http://code.google.com/p/msysgit/downloads/list 
- Git-x.y.z-previewXXXXXX.exe
- インストール
-- 「Run Git from Windows Command Prompt」 を選択
-- 「Use Windows style line endings」 を選択

**** TortoiseGit (GUI) [#v53d8d10]
- http://sourceforge.jp/projects/tortoisegit/
- インストール
-- 「TortoisePLink ... 」 を選択

** Trouble Shooting 
*** git diff で行末に ^M が表示される
- git config --global core.whitespace cr-at-eol

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 ページ一覧 検索 最終更新   ヘルプ   最終更新のRSS