GitUp Work quickly, safely, and without headaches. The Git interface you've been missing all your life has finally arrived.
git dtコマンド - razokulover publog を見て自分もgitのコマンドをカスタマイズしてるのを思い出したので普段よく使っているのを紹介します。 対象者 作業途中はtmpコミットをたくさん作って、最後に git rebase -i でコミットを整えている人 前置き gitのタイプ数を減らす gitコマンドを使う時に毎回 git と3文字タイプするのは時間の無駄なのでエイリアスつけるのをおすすめします ~/.bash_profile とか ~/.bashrc 辺りに下記を書きます。 alias g='git' これで g だけでgitコマンドが使えます git-now iwata/git-now tmp コミットのための独自サブコマンド git-now - アジャイルSEを目指すブログ 最速でtmpコミットするためのコマンド。Macなら brew install git-
rebaseのinteractiveモードってなんぞや 2個以前の前のコミットメッセージを編集したり、 コミットをまとめたりできることです。 例を見てみましょう コミットメッセージを編集する コミットログを見て、 $ git log --oneline 68be895 commit D 71c87eb commit E 8ed1455 commit C 73c200d commit B 9110548 commit A $ git rebase -i 73c200d pick 8ed1455 commit C pick 71c87eb commit E pick 68be895 commit D # Rebase 73c200d..68be895 onto 73c200d # # Commands: # p, pick = use commit # r, reword = use comm
# masterブランチに移動 git checkout master # masterブランチを最新にする git pull origin master # 新しい作業ブランチを作成 git checkout -b new_branch # 空コミットを作る git commit --allow-empty -m "[WIP] 今回開発する内容を書く" # push git push origin new_branch この後、Githubの画面に行ってpull requestを送ります。 2.タスクを洗い出す Githubのプルリクエストにタスクを積みましょう。 下記のようにコメントすればチェックリストが作れます。
Gitは特定のコマンドが実行された場合に、スクリプトを起動させることができる。 そのスクリプトは.git/hooks フォルダに特定の名称で作成することで実行される。 検証プログラム 検証環境は以下の通り Debian7.0 git version 1.7.10.4 フックの動作を検証するために、各フックスクリプトに下記を記述する。 #!/bin/sh logger "********************************************" logger ${0##*/} logger "param $*" logger "param cont $#" logger "input..." while read i; do logger ${i} done これにより、フックスクリプトの発生順と、パラメータ、標準入力の検証が行える。 フックの確認 commitコマンドのフッ
みんな大好きpecoを使って、git add出来るようにした 作ったもの 深いディレクトリにあるファイルが複数ある時、zshのtab補完でやるのも面倒だったので、peco使ってやりたいな〜と思ったからzsh関数書いた コード 複数選択に対応した 上のgifのように複数選択出来る 検索のハイライトと選択中のハイライトの色が被ってるため見難くなってしまっている function peco-select-gitadd() { local SELECTED_FILE_TO_ADD="$(git status --porcelain | \ peco --query "$LBUFFER" | \ awk -F ' ' '{print $NF}')" if [ -n "$SELECTED_FILE_TO_ADD" ]; then BUFFER="git add $(echo "$SELECTED_FI
Git の仕組みシリーズの2回目です。目次がここにあります。 前回の記事では、Git オブジェクトとリファレンスが大きなツリー構造になっていることを説明しました。 また、Git オブジェクトがどのように記録されているか、 ファイルツリーの変更がルート tree オブジェクトの ID に反映される仕組みなどを見てきました。 今回は commit オブジェクト、ブランチ、タグ、stash の仕組みについて説明します。 実際のデータが見たいときは、Git Object Browser にアクセスしてみてください。 5. commit オブジェクト 先に説明した通り、Git オブジェクトデータベースには、複数のファイルツリーを保存できます。 個々のファイルツリーは、最上位 (ルート) にある tree オブジェクトの ID で区別することができます。ファイルツリーは、大抵の場合、過去のファイルツリ
@yuku_t Qiitaに載ってた GitHub Cheet Sheet 入門Git コンフリクト発生時の問題 もとの状態がよくわからなくなるとき merge.conflictstyle もとの祖先を表示さす git stash save pop indexしたものがstashされる --all --inclide-untracked --keep-index(index treeをそのまま残す) 全く新しいworking directoryがほしい git-new-workdir シンボリックリンクを貼ってくれるところがgit cloneと違うところ。 編集もstashも同期される。 diff-highlight git-core/contrib git diff & apply $ git diff -w | git apply --cached w 空白文字 cached inde
GitHub User Group主催のGitHub Kaigiが6月1日、都内で開催されました。GitHubを利用した開発は、スタートアップやオンラインサービス系の企業などを中心に広まりつつあり、いままさに数多くのノウハウの交換が求められているツールでもあります。 本記事ではGitHub Kaigiの最初のセッションとなった大塚弘記氏の「GitHub実践入門 ─ Pull Requestによる開発の変革」の内容をダイジェストで紹介します。 GitHub実践入門 ─ Pull Requestによる開発の変革 大塚弘記といいます。会社でもリアルでもほとんど@hirocasterと呼ばれています。 今日はメッセージを3つ持ってきました。まず、GitHubを使っている世界と使っていない世界についての話を少し。次に、GitHubを使っているけれど、十分に使っているかどうか、という話をして、最後に本
gitを今の開発でガッツリ使うようになってすげー便利だと思った拡張を3つ紹介します。 もうね、これらなしではgit使えない。せっかくなので、導入方法と一緒に簡単な使い方も紹介します。 git-completion gitの補完ツール。 コマンドラインに現在のブランチ名が出る。だけじゃなくて、タブで補完までしてくれる。 導入方法 以下の方法でスクリプトをダウンロードしてきます。 $ mkdir -p /usr/local/git/contrib/completion/; cd /usr/local/git/contrib/completion/ $ curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash > git-completion.bash $ curl https://raw.
C言語、Perl、JavaScript、最近はPythonも。出来上がったものより、プログラムを書くことが好き。あと、スイーツ。 コマンドラインで git管理されたファイルをどうやってみるの? というのを調べて、便利なaliasを作った。 gitkとか、TortoiseGitを使えば良いのだけど、 コマンドラインでさくっと見たいときに便利だし、 加工しやすいしね。 svnでいうと、'svn ls'とか'svn status -v'とかのイメージ。 gitだと、ls-files があるので、試してみる。 ちなみにリポジトリは git のソースコード。 $ git ls-files .gitattributes .gitignore .mailmap COPYING Documentation/.gitattributes Documentation/.gitignore Documentat
概要 gitのバージョンが1.7.10以降ならば、.gitconfig内で他のファイルをincludeできます。 ドットファイルを公開リポジトリで管理していても、社内プロキシ情報などだけはinclude先のファイルに記載しておくことで非公開にしておくことが可能です。 includeで指定したファイルがなくてもC1083 error when it can't find a file.なんてエラーはおきませんよ。 はじめに 以下のような記事を書きました。 homeshickとgit submoduleコマンドでプラグインも含めたドットファイルを全て管理する http://qiita.com/budougumi0617/items/07cd145af12c65dbe77c でも、うちの会社proxy設定が必要なんです。.gitconfigに認証情報書いているんで公開できません。 でもgitなら
目次 はじめに Git を使ったことがない方へ 生のデータが見たい方へ Git の全体像 .git の中身 Git オブジェクトデータベース 4種類のオブジェクト リファレンス リファレンスのリファレンス 大きなツリー Git オブジェクトの ID と 中身 ハッシュ関数 SHA1 の簡単な説明 tree と blob オブジェクト tree と blob の参照関係 ルートツリーの ID でツリー全体を識別する commit オブジェクト リファレンスとブランチ ブランチ ブランチ先頭を指すリファレンス HEAD リファレンス detached HEAD 2種類のタグ 一時待避 (stash) インデックス キャッシュとしての役割 マージ Fast-Forward マージ non Fast-Forward マージ rebase reset 2種類のブランチ 各リポジトリが自分のブランチを
Jul 6, 2014 個人開発ではサーバーとクライアントのリポジトリを1つにまとめたいことがあると思います。
About git-flow are a set of git extensions to provide high-level repository operations for Vincent Driessen's branching model. more ★ ★ ★ This cheatsheet shows the basic usage and effect of git-flow operations ★ ★ ★ Basic tips Git flow provides excellent command line help and output. Read it carefully to see what's happening... The macOS/Windows Client Sourcetree is an excellent git gui and provid
以前は問題なく動いていたはずの機能が、最新版では動かなくなっている・・・。こんなときは、「どのコミットが問題を混入させてしまったのだろうか?」を知りたくなるでしょう。 これを手助けするのが git bisect コマンドです。git bisect コマンドは、二分探索によって問題箇所を特定します。 事前準備 最初に大事なことがひとつあります。それは、「問題がない(good)状態と問題がある(bad)状態を、確実に判定できるようにする」 ことです。 当然のことではありますが、ここがあやふやだと、二分探索をしても問題箇所をうまく特定できません。 可能なら、「テストスクリプトを1つ実行するだけで判定」できるようにしたほうが良いです。このとき、テストスクリプトは、git リポジトリからチェックアウトした作業ツリーに対して実行できるようにします(例えばソースからのビルド処理もテストスクリプトに含めま
Git で管理してるレポジトリーで、いくつかのブランチを別々の場所にチェックアウトしたいことがある。 たとえば GUI なツールでブランチ間の比較したい 同時に実行して比較しつつテストしたい ブランチ間でファイルをコピーしたい ドキュメントの生成結果を別ブランチで管理したい といったときに、必要になる。 ブランチの個数だけ clone しちゃえば用は足りそうなんだけど、でかいレポジトリーだったら時間もディスク容量ももったいない。 git-new-workdir を使うべきでしょう! 先日、「git-new-workdir を使えばワーキング ディレクトリーを複数を作れて便利」と書いてあるブログを読んだ。 git-new-workdir が便利 - #生存戦略 、それは - subtech git-new-workdir の usage を見てたら、別ブランチのワーキング ディレクトリー作成
サルでもわかるGit入門 〜バージョン管理を使いこなそう〜 | どこでもプロジェクト管理バックログ ビジュアル的にも丁寧でよくまとまっている デザイナのための Git コマンドの要点がまとまったガイド gitの基礎 (全22回) - ドットインストール ドットインストールのスクリーンキャスト Git - Book - いわゆる Pro Git Git - Book - 日本語訳もある Pro Gitの日本語版PDF等 Gitのセットアップ - homebrewをフォークするためのGit&GitHub入門 前編 - A Way of Code GitとGithubのセットアップ ブランチもマージも簡単な分散型バージョン管理システム はじめてのGit - WEB+DB PRESS Vol.50 WEB+DB PRESS 総集編 に含まれてる
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く