*Git入門 [#f51c0e07]
-[[とても分かりやすいslide>http://www.slideshare.net/matsukaz/git-17499005]]&note{git-tutorial-slideshare-matsushita-masakazu:Masakazu Matsushita, [[いつやるの?Git入門>http://www.slideshare.net/matsukaz/git-17499005]], 2013-05-22発表, 2013-05-23閲覧};
-[[前述のスライドの改良版>http://www.slideshare.net/matsukaz/git-28304397]]&note{git-tutorial-slideshare-matsushita-masakazu-110:Masakazu Matsushita, [[いつやるの?Git入門 v1.1.0>http://www.slideshare.net/matsukaz/git-28304397]], v1.10, 2013-11-16公開, 2014-12-01閲覧};

*Mac OSX にGitをインストールする方法 [#da88d0c8]
-githubの公式サイトが説明に詳しい
-Git公式サイトからGitをダウンロードする
-コマンドライン版を選択
-git config コマンドでユーザ名とメールアドレスを保存し、パスワードも保存するようにosxkeychain を設定
 $ git config --global user.name ユーザ名 ← ユーザ名を設定
 $ git config --global user.email メールアドレス ← メールアドレスを設定
 $ git credential-osxkeychain ← credential-osxkeychain がインストールされてるか確認
 Usage: git credential-osxkeychain <get|store|erase> ← この表示が出たらインストールされている証拠
 $ git config --global credential.helper osxkeychain ← credential-osxkeychainを使ってパスワードを保存するように設定

*git のrevertはsvn のrevertとは違う。 [#n7e54f5e]
-いっつも、git stash とかして変更点を破棄してしまうのだが、これじゃ行けないのかな?
-[[SubversionとGitコマンド対応表 - 発声練習>http://d.hatena.ne.jp/next49/20130410/p1]]&note{correspondence-of-svn-command-and-git-command:[[SubversionとGitコマンド対応表 - 発声練習>http://d.hatena.ne.jp/next49/20130410/p1]], 2013-04-10発表, 2014-11-30閲覧};

*git コンソールから、自分のメールアドレスと名前を設定する [#h8493d56]
-1度configすれば良い
 git config --global user.name "<ユーザー名>"
 git config --global user.email "<メールアドレス>"
-[[コンソールでGitを利用する | Gitの使い方>http://codebreak.com/ja/contents/guide/console/]]&note{how-to-config-git-from-command-line:[[コンソールでGitを利用する | Gitの使い方>http://codebreak.com/ja/contents/guide/console/]], 2014-11-30閲覧};

*refusing to update checked out branch [#ob061b7f]
-git push すると、何故か'refusing to update checked out branch'というエラーが発生して困っていた
-リモートのリポジトリは同じマシン上のDropbox内だった。
-なので、Dropbox内からpullしたら解決していた。
-が、pushしたい!
-どうやら、Dropboxがただのリポジトリじゃなくて作業領域になっていたのが問題のもよう。
-git bash でgit のコマンドラインを出して、以下のコマンドをタイプした
 git config --bool core.bare true
-その上で、Dropbox内のリポジトリから、.git というディレクトリ''以外''を全部まるっと削除
-.gitディレクトリは隠しディレクトリなので通常は見えない点に注意。
-参考:[[Git push error '[remote rejected] master -> master (branch is currently checked out)' - Stack Overflow>http://stackoverflow.com/questions/2816369/git-push-error-remote-rejected-master-master-branch-is-currently-checked]]&note{git-push-error-remote-rejected-master-master-branch-is-currently-checked:[[Git push error '[remote rejected] master -> master (branch is currently checked out)' - Stack Overflow>http://stackoverflow.com/questions/2816369/git-push-error-remote-rejected-master-master-branch-is-currently-checked]], 2010-05-12投稿, 2010-07-14回答, 2014-07-17更新, 2014-11-30閲覧};

*You are not currently on a branch, so I cannot use any... と言われる [#w5c695e7]
-master に行けば良いので、
-作業ディレクトリのルートに行って、
 git checkout master
-とすれば良い。
-[[git pull says &#8220;You are not currently on a branch&#8230;&#8221; | Slacy's Blog>http://slacy.com/blog/2011/04/git-pull-says-you-are-not-currently-on-a-branch/]]&note{git-pull-says-you-are-not-currently-on-a-branch:[[git pull says &#8220;You are not currently on a branch&#8230;&#8221; | Slacy's Blog>http://slacy.com/blog/2011/04/git-pull-says-you-are-not-currently-on-a-branch/]], 2011-04-04公開, 2014-12-01閲覧};
*Gitワークフロー [#w32c9362]
-様々な運用方針
-[[Git ワークフローとそのチュートリアル | アトラシアン>https://www.atlassian.com/ja/git/workflows]]&note{git-work-flow:[[Git ワークフローとそのチュートリアル | アトラシアン>https://www.atlassian.com/ja/git/workflows]], 2014-12-01閲覧};

*Gitでコミットをなかったことにする方法(いわゆる黒歴史修正) [#t80a8a35]
-[[gitでアレを元に戻す108の方法 - TIM Labs>http://labs.timedia.co.jp/2011/08/git-undo-999.html]]&note{git-undo-999:[[gitでアレを元に戻す108の方法 - TIM Labs>http://labs.timedia.co.jp/2011/08/git-undo-999.html]], 2011-08-21公開, 2014-12-01閲覧};
-[[gitで一度行った変更をなかったことにする方法4つ - TIM Labs>http://labs.timedia.co.jp/2011/02/git-various-undo.html]]&note{git-various-undo:[[gitで一度行った変更をなかったことにする方法4つ - TIM Labs>http://labs.timedia.co.jp/2011/02/git-various-undo.html]], 2011-02-20公開, 2014-12-01閲覧};

*githubにSSHで接続する [#l6a4af48]
-[[【メモ】githubの複数アカウントにSSH接続するための設定手順 | Developers.IO>http://dev.classmethod.jp/tool/github-ssh-sub-account-setting/]]&note{github-ssh-sub-account-setting:野中 龍一, [[【メモ】githubの複数アカウントにSSH接続するための設定手順 | Developers.IO>http://dev.classmethod.jp/tool/github-ssh-sub-account-setting/]], 2013-07-14公開, 2014-12-01閲覧};
-[[Githubへのpushでusername/passwordを省略する方法2つ - Shoken>http://shoken.hatenablog.com/entry/20120629/p1]]&note{how-to-skip-typing-password:[[Githubへのpushでusername/passwordを省略する方法2つ - Shoken>http://shoken.hatenablog.com/entry/20120629/p1]], 2012-06-29公開, 2014-12-01閲覧};

*git rebaseの使い方 [#ac5f1b30]
-まだgit rebaseを使いこなせていない。
-git cherry-pick で1個ずつコミットを追加していくのは理解できるのだが、rebaseは難しい
-参考:[[初心者でも分かる!git rebaseの使い方を解説します | 株式会社LIG>http://liginc.co.jp/web/tool/79390]]&note{how-to-use-git-rebase:[[初心者でも分かる!git rebaseの使い方を解説します | 株式会社LIG>http://liginc.co.jp/web/tool/79390]], 2014-05-07公開, 2014-12-11閲覧};

*git の remote に branch を push したりする方法 [#ae22adc0]
-git checkout -b foo origin/feature
-みたいにできる
-参考:[[remote に branch を push し、remote から clone したリポジトリの branch を変更して push する - basyura&#39;s blog>http://blog.basyura.org/entry/20100323/p1]]&note{how-to-push-a-branch-to-remote-repository:basyura, [[remote に branch を push し、remote から clone したリポジトリの branch を変更して push する - basyura&#39;s blog>http://blog.basyura.org/entry/20100323/p1]], 2010-03-23公開, 2014-12-11閲覧};

*gist [#a909a194]
-gitと直接関係はないが、gistにコードをコピペして、公開できる
-[[Gists>https://gist.github.com/]]

*gitのプルリクエストを自動的にテストしてからマージする [#tfef178b]
-よくある話だし、OpenCVのリポジトリもそうなっている
-Jenkisと連携して細かく設定する
-[[jenkins で GitHub のプルリクエストをマージしてテストする - Please Sleep>http://please-sleep.cou929.nu/jenkins-github-pull-request-builder-plugin.html]]&note{jenkins-github-pull-request-builder-plugin.html:[[jenkins で GitHub のプルリクエストをマージしてテストする - Please Sleep>http://please-sleep.cou929.nu/jenkins-github-pull-request-builder-plugin.html]], 2014-03-22公開, 2014-12-11閲覧};

[[SVNがらみ]]

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