タグ

2011年2月28日のブックマーク (3件)

  • Gitでリモートリポジトリを巻き戻す - tmtms のメモ

    Gitで間違ったコミットをリモートリポジトリに push してしまった後に、それを無かったことにするには、リモート側での作業が必要だと思っていたのですが、ローカルからの操作でもできることがわかったので備忘録的に書いておきます。 次の状態にあるとします。アルファベットはコミットだと思ってください。 リモート: A-B-C master ローカル: A-B-C-D masterローカルで変更を加えてDの状態になっています。 git push すると次のようになるのですが、 リモート: A-B-C-D master ローカル: A-B-C-D masterここで、D は間違いだったと気づきました。 リモートリポジトリの master のバックアップ用のブランチを作ります。これは必須ではありませんが、念のため。 % git push origin master:master_bakこれで次の状態に

    Gitでリモートリポジトリを巻き戻す - tmtms のメモ
    f96q
    f96q 2011/02/28
  • hub

    hub hub teaches git about GitHub Full docs: man hub # on a Mac $ brew install hub # otherwise $ curl http://defunkt.github.com/hub/standalone -so ~/bin/hub $ chmod +x ~/bin/hub # wrapping git $ alias git=hub Apprentice $ git clone dotfiles → git clone git://github.com/YOUR_USER/dotfiles.git $ git clone defunkt/hub → git clone git://github.com/defunkt/hub.git # see the current project's wiki $ git

    f96q
    f96q 2011/02/28
  • 【翻訳】あなたの知らないGit Tips

    Mislav Marohnićさんの "A few git tips you didn't know about" を翻訳しました。 元記事はこちら: http://mislav.uniqpath.com/2010/07/git-tips/ (翻訳の公開は人より許諾済みです) 翻訳の間違い等があれば遠慮なくご指摘ください。 あなたの知らないGit Tips注意:いくつかのコマンドやオプションは Git の version 1.7.2 以降が必要です。 OS Xでは、 Homebrew で簡単にアップグレードできます: brew install git git log でブランチとタグも見る$ git log --oneline --decorate 7466000 (HEAD, mislav/master, mislav) fix test that fails if current d

    f96q
    f96q 2011/02/28