タグ

vcsとcodingに関するcu39のブックマーク (115)

  • In git, is there a way to show untracked stashed files without applying the stash?

    If I run git stash -u, I can stash untracked files. However, said untracked files don't show up at all with git stash show stash@{0}. Is there any way to show untracked stashed files without applying the stash?

    In git, is there a way to show untracked stashed files without applying the stash?
    cu39
    cu39 2019/10/22
    git stash save -u したスタッシュのuntrackedなファイルを表示するには git show stash@{0}^3 ファイル単独表示 git show stash@{0}^3:<path/to/file> 取り出す git checkout stash@{0}^3: <path/to/file> checkoutはスペース注意
  • なぜ git rebase をやめるべきか - Frasco

    Git での開発を数年間経験した後、徐々に日々の仕事の一部として、より高度な Git コマンドを使うようになりました。私は Git rebase を見つけてすぐにそれを毎日の仕事に使いました。リベースに精通している人は、どれだけ強力で魅力的なツールであるのか知っているでしょう。しかし、リベースには、初めてリベースを触ったときにはわからなかったのですが、いくつかの課題があることに気が付きました。これを説明する前に、マージとリベースの違いをおさらいしておきましょう。 最初に、feature ブランチを master にマージする例を考えてみましょう。マージすることにより、新しいマージコミット g を作成します。下のコミットグラフではマージした際に何が起こるのかを説明しています。また、開発が盛んなリポジトリでよく見かける「線路」のようなグラフになっているのが見て取れるでしょう。 マージの例 ある

    なぜ git rebase をやめるべきか - Frasco
  • GitlabのOmnibus版をインストールしてApacheで運用してみる(ついでにSSLと自動バックアップも) - Qiita

    調べるとこんな記事が結構あったけど、もう古くなったバージョンだったり、情報が散らばってたりするので、最新バージョンでやってみた場合のメモ。 もしかしたら不要な設定があるかもしれないけど、とりあえずこれで動作確認はOK。 以下に設定ファイル含めた全貌を記載。 インストール環境 サーバ CentOS 6.5 メモリはとりあえずgitlab推奨の2GB Gitlab Omnibusパッケージのインストール GitlabのHPから対象のOSを選択するとインストール方法が出てくる。 Gitlab体のインストールは上記の通りやっていけばすんなりと完了する(ほんとに2分で終わる) 今回はGitLab Community Edition 8.7.0の最新版をインストールした。 Omnibusパッケージだとpostgresもnginxもすべて必要なものをインストール、設定してくれるため非常に楽だが、すでに

    GitlabのOmnibus版をインストールしてApacheで運用してみる(ついでにSSLと自動バックアップも) - Qiita
  • 人間らしいGitのエイリアス | POSTD

    断固としてコンピュータ言語を拒絶する 私の知っている最も一般的な .gitconfig は、ユーザ名の設定だけが記されたものです。そして、その次に一般的なものはこれです。 [alias] ci = commit cia = commit -a cam = commit --amend cama = commit --amend -a cl = clean cldf = clean -df res = reset resa = reset HEAD ... # 82 more 4-character aliases このコンフィグは、要するにあなたの頭の中のスペースをキーストロークに置き換えます。短縮コマンドのエイリアスを覚えれば、タイピング数の節約が可能です。しかし私はこれが好きではありません。私はタイプミスをしますし、睡眠不足なこともたまにあるので、このエイリアスではやりづらくなってしま

    人間らしいGitのエイリアス | POSTD
  • Introducing unlimited private repositories

    ProductIntroducing unlimited private repositoriesWe couldn’t be more excited to announce that all of our paid plans on GitHub.com now include unlimited private repositories. GitHub will always be free for public and open source… We couldn’t be more excited to announce that all of our paid plans on GitHub.com now include unlimited private repositories. GitHub will always be free for public and open

    Introducing unlimited private repositories
  • BitKeeper

    BitKeeper is the original distributed source management system. Now available as Open Source under the Apache 2.0 License. BitKeeper is a fast, enterprise-ready, distributed SCM that scales up to very large projects and down to tiny ones. Features Simple: An easy to use command line interface. Scalable: Nested Repositories are submodules done right! Version control collections of repositories. Fle

  • 今さら聞けないgit pushコマンド - Shoichi Matsuda's diary

    id:koogawaさんのgitの記事を読みました。 これを読んでそういえばみんな知ってるのかなと思った点があるので書いておきます。 取り上げるのはgitのpush周りのお話です。 (これ以降の記事中のリモートは全てoriginとします。) このコロンは何?? リモートブランチの削除で以下のようなコマンドを実行すると思います。 git push origin :hoge コロンが付いていますがこのコロン正体、正しく説明できますか? 実用Git 作者: Jon Loeliger,吉藤英明(監訳),間雅洋,渡邉健太郎,浜階生出版社/メーカー: オライリージャパン発売日: 2010/02/19メディア: 大型購入: 7人 クリック: 287回この商品を含むブログ (44件) を見る pushコマンドの実体 普通、ローカルブランチをリモートに反映する際のコマンドはこんな感じです。 git p

    今さら聞けないgit pushコマンド - Shoichi Matsuda's diary
  • [Git] .gitignoreの仕様詳解 - Qiita

    対応バージョン この記事の内容は、少なくともGitのバージョン2.19.1までは対応している。 もし最新のGitで新しい動きがあれば随時更新する。 基 .gitignoreを使うと無視する(Gitのトラッキングの対象外とする)ファイル or ディレクトリを指定できる。 .gitignoreは複数のディレクトリに置くことができる。 深い階層の.gitignoreに書かれた指定の方が優先順位が高い。(後に解釈される) .gitignore内の記述は上の行から順に以下のように解釈される。 /を含まない行(fileなど) .gitignore以下の全サブディレクトリ下にあるこの名前のファイル or ディレクトリを無視する 末尾以外にのみ/を含む行(/file, /path/to/file, path/to/fileなど) .gitignoreが置いてあるディレクトリをカレントディレクトリとする相

    [Git] .gitignoreの仕様詳解 - Qiita
  • 19 Git Tips For Everyday Use - Tech TLDR;

    Table of Contents: Parameters for better logging git log --oneline --graphLog actual changes in a file git log -p filenameOnly Log changes for some specific lines in file git log -L 1,1:some-file.txtLog changes not yet merged to the parent branch git log --no-merges master..Extract a file from another branch git show some-branch:some-file.jsSome notes on rebasing git pull --rebaseRemember the bran

    19 Git Tips For Everyday Use - Tech TLDR;
  • Using a Git submodule as Maven parent project

    This hint is especially useful if you have two Maven projects — a parent project and a child project depending on it — on which you want to develop concurrently. The directory structure will look like this: The most important part in the child project’s POM is assigning the parent project to the subfolder parent instead of using an installed artifact: What we have now, is a combination of two proj

  • Show HN: 'git inject' – amend commits other than HEAD | Hacker News

    'git inject' is a git alias (see code at the bottom). It is similar to 'git commit --amend', but it allows you to 'inject' your changes into commits further back in history (using 'rebase').If you're as pedantic as I am about the git history you're about to push into master (as far as I can control it, I strive to keep each commit conceptually coherent), you'll often come to a situation where you

  • GitHubのようなサイトを独自に運用できる「GitLab」や「GitBucket」を使ってみよう | さくらのナレッジ

    (※3月18日追記:当初「SSH公開鍵の管理機能」において、GitBucketを「×」としていましたが、SSHアクセス機能を機能を有効にすることでSSH公開鍵の管理機能も利用できるとのことで、「○」に修正しました) GitLabおよびGitBucketと、RedmineおよびTracとの大きな違いとして、フォークやマージ/プルリクエスト機能をサポートしているかどうかがある。これらの機能を利用したいのであれば、GitLabやGitBucketが候補となるだろう。 いっぽう、Redmineはカレンダー機能やガントチャートと言ったプロジェクト管理機能が充実しているのが特徴だ。また、Tracはシンプルなユーザーインターフェイスや、プラグインによるカスタマイズ性の高さがある。フォークやマージ/プルリクエスト機能を利用しないのであれば、プロジェクト管理機能が充実しているRedmineやTracは十分な

    GitHubのようなサイトを独自に運用できる「GitLab」や「GitBucket」を使ってみよう | さくらのナレッジ
  • 2014年、春のGit事情 - fujimuradaisuke's blog

    なんとなく最近どんな感じでGitを使っているか、適当にリストアップしてみた。 よく使うやつ git status git status --branch --short にしている。変更されたファイルが出る。とりあえず何をしたかざっくり把握する用。sにエイリアスしている。一日100回くらい実行しているのではないか。 git diff 特にオプションは指定していない。何をしたかしっかり把握する用。dにエイリアスしている。一日50回くらい実行しているのではないか。 git grep バージョン管理しているファイルから渡した単語を含む行を検索、表示。関数の検索などあらゆる場面で超便利。オプションは --line-number --show-function --color --heading --break がオススメ。 git ls-files バージョン管理しているファイルのファイルパスを表

    2014年、春のGit事情 - fujimuradaisuke's blog
  • git rebaseのメモ - unpushの日記

    ときどき間違うので。 大雑把に言うと、git rebase は「git reset + git cherry-pick × n回 を自動化したもの」と考えられる(適用するコミット群が少なければ、手動でreset & cherry-pickしても良いが、たくさんあるとそうもいかない) 好きな場所にresetして、好きな位置から好きな位置までのコミットを順次適用できる。 つまりコミットを並べ替えたり除外したり、「積み木を積み直す」ようなことが出来る。 git rebase ポピュラーな使い方。 現在のブランチをにreset から見て現在のブランチにだけ存在していたコミットを順に適用 適用されるコミット群は、から見て現在のブランチにだけ存在していたコミット、つまりgit log ..HEAD で出てくるコミット。 以下の例だとA、B、Cのコミットがreset後に適用される予定 A---B---C

    git rebaseのメモ - unpushの日記
    cu39
    cu39 2014/04/14
    「でもrebaseは特に--onto付けるとドキドキする」
  • gitのコミットの歴史を改変する(git rebase) 2 / 2 · けんごのお屋敷

    git rebase パート1の続きです。 fixed(コメントは変更せずにコミットをまとめる) fixed は squash と同じく1つ前のコミットとまとめる機能がありますが squash と違うのはコメントはそのままにするということです。 squash と同じ説明になりますが 70b3379 の メソッド名のタイポ修正 を何事もなかったかのようにしたい時は cce19c9 とまとめてしまいます。いつものように [kengo@tkengo-mac] $ git rebase -i cce19c9~1 こうして pick cce19c9 通信用のクラスの実装とテストの追加 fixed 70b3379 メソッド名のタイポ修正 pick aebf22c テストが落ちてたので修正 とします。すると squash の場合はこの後にコメントを入力する画面が出て来ましたが fixed の場合はそれが

  • gitのコミットの歴史を改変する(git rebase) 1 / 2 · けんごのお屋敷

    git には rebase というとても便利なコマンドがあります。その中でも特に便利なのが -i または --interactive オプションです。便利なのですがよく忘れるのでまとめもかねてこの記事で詳しく紹介します。 前提 この記事では説明のために以下のようなコミット状態である前提で話を始めます。よくあるコミットの流れです。 git rebase -i -i は --interactive とあるように、対話的に rebase が実行できるコマンドです。これでなにが出来るかというと コミットメッセージを編集する コミットをまとめる コミットを分割する コミットの順番を移動させる コミットを削除する など、いろんなことが出来ます。基的な構文は [kengo@tkengo-mac] $ git rebase -i <commit> これだけ。 <commit> には特定のコミットを指定し

  • やさしいGitの内部構造 - yapcasia2013

    32. コミットオブジェクト あああ $ git cat-file -p 6e3c7a7 たったのこれだけ。 メタ情報しかない。 tree b2ba084f61385d9560daa1b43a98014c27620cee parent 365d440b4c1ab31703ccbb7e2a9980d49cf8ebf6 parent 93f2ceeb0f0608f3754d379dcc473297ad1f0f43 author Tatsuhiko Miyagawa <miyagawa@xxxx.net> committer Tatsuhiko Miyagawa <miyagawa@xxxx.net> Merge pull request #430 from kazeburo/master ← コミットハッシュ値を指定 33. $ git cat-file -p 6e3c7a7 tree: スナ

    やさしいGitの内部構造 - yapcasia2013
    cu39
    cu39 2014/04/13
    わかりやすい。
  • git pullでファイルに変更があったら特定のコマンドを実行する。 - from scratch

    最近ガッツリnode.jsのプロジェクトを行っているんですが、チームで開発しててよくあるのが、git pullした後にpackage.jsonやbower.jsonが変更されている事に気づかず、 そのまま起動してしまい、モジュールが足りてなくて動作しないって事です。 多分コレってnode.jsに限らずrubyとかperlとかphpとかpythonとか何でもあると思うんです。もうすぐ、2014年度です、運用でpullしてエラーが出たらnpm install/cpanm/bundle installしましょうとか言うのは辞めましょう。*1 git pullしたら変更されたファイルの一覧から 対象のファイルが変更されているかどうかを認識して、特定のコマンドを自動で実行するためのコマンド、hookinを作りました。 Getting started npmが入っているなら超簡単で、 $ npm in

    git pullでファイルに変更があったら特定のコマンドを実行する。 - from scratch
  • Git Source Code Review

    Git Source Code Review: Overview Since its release in December 2005, git has taken over the software industry. In combination with GitHub it is now a powerful tool to publish and share code: From big teams (linux kernel, id Software, Epic Unreal) to single individual (Prince of Persia, Another world, Rick Dangerous), many have adopted it as their main SCM. I wanted to get a better understanding of

  • Self-hosted Git Server

    I've had a GitHub account since 2008. June 16th, to be exact. For almost six years I've been hosting my code on someone else's servers. It was sure convenient, and free, and I don't regret it one bit, but the time has come to move that vital service in-house. I've run my own private git server on the Mac mini in my living room since 2012. For the last few years, then, my GitHub account has become

    Self-hosted Git Server