Revisions
-
Milly revised this gist
Jun 13, 2012 . 1 changed file with 7 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ Gitチートシート =============== [msysGit](http://code.google.com/p/msysgit/)をインストール後、 「スタート」>「Git」>「Git Bash」を実行して Git Bash を立ち上げ、 以下のコマンドを実行することで、さまざまな作業を行えます @@ -102,7 +102,7 @@ Gitチートシート $ git checkout ブランチ名 $ git checkout -b まとめブランチ名 $ git rebase -i master <ここで、vi が開くので、2行目以降の行頭の pick を squash に変更する> $ git push origin まとめブランチ名 ``` - GitHub にあるブランチ一覧を見る @@ -129,4 +129,8 @@ Gitチートシート - タグ名-タグから最新までのコミット数-g最新のコミットハッシュ値 (GitHubでのzipballの名前の後半はこれを用いている) $ git describe --tags --dirty --long - ログのツリー表示 $ git log --graph --decorate --pretty=oneline --abbrev-commit -
xyzzy-17-638 revised this gist
May 21, 2012 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,10 +28,10 @@ Gitチートシート $ git config user.name "ユーザ名" $ git config user.email "メールアドレス" - エディタを設定する (C:\app\xyzzy\xyzzy.exe) - ただし、この設定だと日本語が使えない :( $ cd /c/github/xyzzy $ git config core.editor "start //wait /c/app/xyzzy/xyzzycli.exe -wait" ## 日常の操作 @@ -129,4 +129,4 @@ Gitチートシート - タグ名-タグから最新までのコミット数-g最新のコミットハッシュ値 (GitHubでのzipballの名前の後半はこれを用いている) $ git describe --tags --dirty --long -
xyzzy-17-638 revised this gist
May 6, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -127,6 +127,6 @@ Gitチートシート $ git describe --tags --dirty --abbrev=0 - タグ名-タグから最新までのコミット数-g最新のコミットハッシュ値 (GitHubでのzipballの名前の後半はこれを用いている) $ git describe --tags --dirty --long -
xyzzy-17-638 revised this gist
May 6, 2012 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -117,16 +117,16 @@ Gitチートシート - タグ一覧 $ git tag -l - タグプッシュ $ git push --tags - 直近のタグ名 $ git describe --tags --dirty --abbrev=0 - タグ名+コミット数+コミットハッシュ値 (GitHubでのzipballの名前の後半はこれを用いている) $ git describe --tags --dirty --long -
xyzzy-17-638 revised this gist
May 6, 2012 . 1 changed file with 4 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -115,26 +115,18 @@ Gitチートシート $ cd /c/github/xyzzy $ git push origin :ブランチ名 - タグ一覧 $ git tag -l - タグプッシュ $ git push --tags - 直近のタグ名 $ git describe --tags --dirty --abbrev=0 - タグ名+コミット数+コミットハッシュ値 (GitHubでのzipballの名前の後半はこれを用いている) $ git describe --tags --dirty --long -
xyzzy-17-638 revised this gist
May 6, 2012 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -115,19 +115,26 @@ Gitチートシート $ cd /c/github/xyzzy $ git push origin :ブランチ名 - タグ一覧 ``` $ git tag -l ``` - タグプッシュ ``` $ git push --tags ``` - 直近のタグ名 ``` $ git describe --tags --dirty --abbrev=0 ``` - タグ名+コミット数+コミットハッシュ値 (GitHubでのzipballの名前の後半はこれを用いている) ``` $ git describe --tags --dirty --long ``` -
xyzzy-17-638 revised this gist
May 6, 2012 . 1 changed file with 18 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -113,4 +113,21 @@ Gitチートシート - GitHub にあるブランチを消す $ cd /c/github/xyzzy $ git push origin :ブランチ名 - タグ一覧 $ git tag -l - タグプッシュ $ git push --tags - 直近のタグ名 $ git describe --tags --dirty --abbrev=0 - タグ名+コミット数+コミットハッシュ値 (GitHubでのzipballの名前の後半はこれを用いている) $ git describe --tags --dirty --long -
xyzzy-17-638 revised this gist
May 5, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -97,14 +97,14 @@ Gitチートシート $ git branch -d ブランチ名 - Pull Request 用に、コミットを 1 つにまとめて GitHub に push する ``` $ cd /c/github/xyzzy $ git checkout ブランチ名 $ git checkout -b まとめブランチ名 $ git rebase -i master <ここで、vi が開くので、2行目以降の行頭の pick を squash に変更する> $ git push origin まとめブランチ名 ``` - GitHub にあるブランチ一覧を見る $ cd /c/github/xyzzy -
xyzzy-17-638 revised this gist
May 5, 2012 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,8 +9,8 @@ Gitチートシート ## 簡単な用語集 - master : ローカルの master ブランチ - origin : GitHub上の自分の clone 元のリポジトリのこと - origin/master : GitHub上の自分の clone 元のリポジトリの master ブランチ - upstream : GitHub上のFork元のリポジトリのこと - upstream/master : GitHub上のFork元のリポジトリの master ブランチ @@ -113,4 +113,4 @@ Gitチートシート - GitHub にあるブランチを消す $ cd /c/github/xyzzy $ git push origin :ブランチ名 -
xyzzy-17-638 created this gist
Mar 7, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,116 @@ Gitチートシート =============== [msysGit](http://code.google.com/p/msysgit/)をインストール後、 「スタート」>「Git」>「Git Bash」を実行して Git Bash を立ち上げ、 以下のコマンドを実行することで、さまざまな作業を行えます ## 簡単な用語集 - master : ローカルの master ブランチ - origin : GitHub上の自分の clone したリポジトリのこと - origin/master : GitHub上の自分の clone したリポジトリの master ブランチ - upstream : GitHub上のFork元のリポジトリのこと - upstream/master : GitHub上のFork元のリポジトリの master ブランチ ## 初期設定 - upstream (Fork元) を設定する $ cd /c/github/xyzzy $ git remote add upstream https://github.com/mumurik/xyzzy.git - ユーザ名、メールアドレスを設定する $ cd /c/github/xyzzy $ git config user.name "ユーザ名" $ git config user.email "メールアドレス" - エディタを設定する (C:\app\xyzzy\xyzzy.exe) $ cd /c/github/xyzzy $ git config core.editor "/c/app/xyzzy/xyzzy.exe" ## 日常の操作 - 間違ったので、直前の commit を取り消したい $ cd /c/github/xyzzy $ git reset --hard HEAD^ - とにかく**何もかも消して**、upstream/master と同じ状態に戻したい $ cd /c/github/xyzzy $ git checkout master $ git reset --hard upstream/master $ git clean -fdx - ローカルの作業コピー (master) を Fork 元 (upstream/master) に合わせる $ cd /c/github/xyzzy $ git stash $ git fetch upstream $ git rebase upstream/master master $ git stash pop - ローカルの作業コピー (master) を GitHub にアップロード (push) する $ cd /c/github/xyzzy $ git push origin master - master をもとに、ブランチを作る $ cd /c/github/xyzzy $ git checkout master $ git checkout -b ブランチ名 - ブランチの切り替え $ cd /c/github/xyzzy $ git checkout ブランチ名 - ローカルのブランチと master を upstream に合わせる $ cd /c/github/xyzzy $ git stash $ git fetch upstream $ git rebase upstream/master master $ git rebase master ブランチ名 $ git stash pop - ローカルのブランチを GitHub に push する $ cd /c/github/xyzzy $ git push -f origin ブランチ名 - ローカルのブランチ一覧を見る $ cd /c/github/xyzzy $ git branch - ローカルのブランチを消す $ cd /c/github/xyzzy $ git checkout master $ git branch -d ブランチ名 - Pull Request 用に、コミットを 1 つにまとめて GitHub に push する $ cd /c/github/xyzzy $ git checkout ブランチ名 $ git checkout -b まとめブランチ名 $ git rebase -i master <ここで、vi が開くので、2行目以降の行頭の pick を squash に変更する> $ git push origin まとめブランチ名 - GitHub にあるブランチ一覧を見る $ cd /c/github/xyzzy $ git branch -r - GitHub にあるブランチを消す $ cd /c/github/xyzzy $ git push origin :ブランチ名