You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
2013/08/13 GitHubの新デザインに対応するために記事内容・画像をアップデートしました。 こんにちは、ブログ記事を書くのが約2年ぶりのruedapです。 さっそくですが、Pull Request(プルリクエスト)機能を使ったことはありますか? GitHubの代表的な機能で、「pull req」や「PR」とも略されたりして、名前はよく聞きますよね。 この記事は、Gitはいちおう入門済みで、GitHubも使い始めたけど、Pull Request機能はまだ使ったことがない、そんな人に向けた 簡単な方のPull Request の入門記事です。 もう1つのPull Requestについて Pull Request機能の解説としてよくあるのは「他の人のリポジトリを自分のGitHubアカウントにFork(コピー)してきて、変更を加えて、それを元のリポジトリに取り込んでもらうようにリクエスト
みなさん、Git使ってますか?僕はまだメインのVCSがSubversionなのもあって、なかなか慣れません。せっかくGitを使っているのに、ちょっと不便なSubversionくらいの位置づけです。でも、同じような理解度の人って多いんじゃないでしょうか。 一方で、最近はGitHub管理のオープンソースプロジェクトが増えてきました。バグレポートを送るにしてもpull request*1が前提のような空気があり、Git初心者には少し敷居が高い印象があります。 そんな僕も先日初pull requestをしてみたんですが、色々な失敗の積み重ねで残念なpull requestになってしまいました。その反省を元に、本稿ではpull requestする際のベストプラクティスを紹介します。これは「Git Workflow」をベースにコマンド例などを加筆したものです。 概要 pull requestする際は、
各commitのURL https://github.com/hoge/fuga/commit/xxxxxxxxxxxxxxxxxxxの末尾に "?w=1" をつけてhttps://github.com/hoge/fuga/commit/xxxxxxxxxxxxxxxxxxx?w=1とすると、差分がホワイトスペースのみの行を省いて、文字の変更があった行だけを差分表示してくれるので、何を変更したかがピンポイントですごくわかりやすくなる場合があります。 例えば下記の例。CoffeeScript内である部分をコールバックにして、コールバックした部分のインデントをごっそり下げてるのですが、インデントを変えただけの行も全部差分に表示されてて、何を変えたのかひと目でわかりづらい。 普通のcommit表示 ↓ これがURLに"?w=1"をつけるとこうなる!!! ↓ 単にインデントを変えただけの行が省かれ
markdownといえば各種言語に実装されていますが、GitHubがWeb API形式で変換ツールを出しているようなので遊んでみました。このAPIを通すと、markdownテキストがHTMLに変換されます。 JSONPで使える奴と、RESTっぽくmarkdownなテキスト自体をPOSTするとHTMLの断片が返ってくるraw APIの2つがあります。 利用上限は一時間あたり5000回と太っ腹。 とりあえず、PHP版:http://tojiru.net/markdown.php <?php if (isset($_POST['markdown'])) { $origin = $_POST['markdown']; $ch = curl_init('https://api.github.com/markdown/raw'); curl_setopt($ch, CURLOPT_RETURNTRAN
Github に脆弱性。やった人は Rails に有りがちな脆弱性を issue に挙げていたが相手にされず、実際にそれを突いてきた。一見 childish だが、それだけ簡単に脆弱な実装がなされてしまうということだ。週明けの今日、Rubyist はまず関連情報に一読を。 — Yuki Nishijima (@yuki24) March 4, 2012 気になって調べたのでメモ。自分も気をつけないとなー。 Public Key Security Vulnerability and Mitigation - github.com/blog/ github に脆弱性があってそれが突かれたらしい。 Rails アプリにありがちな脆弱性の一つ、Mass assignment とかいうタイプの脆弱性である。 mass assignment 脆弱性とは mass assignment 脆弱性とは何か、
■ GitHubのセキュリティホールがふさがったのでSSH Keyを確認しよう 先日、Railsアプリにありがちなセキュリティホールがあることが判明したGitHub。詳細は@sora_hによる「github の mass assignment 脆弱性が突かれた件」が非常によくまとまっているので参照のこと。脆弱性の内容そのものもだけど、開発者として脆弱性指摘をどのように受容、対応すべきかを考えさせられる事例だった。 で、これはようするに赤の他人が任意のリポジトリへのコミット権を取得できてしまうという事例だったのだけど、脆弱性の内容をみる限りその他のさまざまな入力もスルーされていた可能性がある。ということで、その対策が(おそらく)なされたのだろう、今朝になってGitHubから「SSH Keyの確認をせよ」というメールがいっせいにユーザに配信された。3日で修正とか、GitHubの中の人もずいぶん
GitHubで人気レポジトリのランキングが公開されているようなので全解説してみました. どれも素晴らしいものばかり! あなたのプログラミングライフを快適にしてくれるライブラリがきっと見つかるはず!! rails rails 9835 watching Ruby on Rails. 説明不要だよね! フルスタックWebフレームワーク jquery jquery 8710 watching JavaScriptライブラリ.これも説明いらないよね! node joyent 8572 watching 旧名node.js.昔の名前の方が通りがいいです.JavaScriptエンジンのV8用のノンブロッキングIOな何か.主にWebサーバ/アプリケーションに使われる. html5-boilerplate paulirish 6998 watching HTML5とかのテンプレート集.ただし公式ページのデ
Webサーバに Subversion のサーバを立てておき、HTML や CSS を commit することでWebサイトを更新する方法は、良く知られているテクニック、らしいですね*1。更新の履歴を残すことができるし、ましてチマチマとFTPやsftpでアップロードするよりずっと簡単です。 しかし SVN の代わりに git を使おうとすると、pushしてもリポートリポジトリではファイルを更新してくれません。 また、リポジトリはWebサーバ上に作るよりも、便利な管理インタフェースがある github(や噂のgitosis)に置いておきたいところです。 そこで、github の Post-Receive Hook を使うと、リポジトリに変更を push すると同時に、Webサーバにも同期させることができます*2。 Webサーバに同期する前に、Sphinxでドキュメントを整形したり、SassをC
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く