EngineeringGet up to speed with partial clone and shallow cloneAs your Git repositories grow, it becomes harder and harder for new developers to clone and start working on them. Git is designed as a distributed version control system. This means that… As your Git repositories grow, it becomes harder and harder for new developers to clone and start working on them. Git is designed as a distributed
Hello! I always wish that command line tools came with data about how popular their various options are, like: “basically nobody uses this one” “80% of people use this, probably take a look” “this one has 6 possible values but people only really use these 2 in practice” So I asked about people’s favourite git config options on Mastodon: what are your favourite git config options to set? Right now
こんにちは!ブロックチェーンチームでエンジニアをしている id:dorapon2000 です。最近買ってよかったものは「潮の華 あおさといわしふりかけ」です。 今回は Git の Squash マージについての知見を共有したいと思います。端的に言うと、 チーム開発で Non Fast-Forward マージをやめて Squash マージを採用し、再び Non Fast-Forward マージに戻した経緯の説明です。Squash マージを運用に導入するか考えたことがある方の参考になればと思います。 Squash マージとは マージには 3 種類ありますね。みなさんはトピックブランチを main へマージする際にどのマージ方法を利用していますか? Fast-Forward マージ git merge --ff-only Non Fast-Forward マージ git merge --no-f
Conventional Commits 人間と機械が読みやすく、意味のあるコミットメッセージにするための仕様 Conventional Commits 1.0.0 概要 Conventional Commits の仕様はコミットメッセージのための軽量の規約です。 明示的なコミット履歴を作成するための簡単なルールを提供します。この規則に従うことで自動化ツールの導入を簡単にします。 コミットメッセージで機能追加・修正・破壊的変更などを説明することで、この規約は SemVer と協調動作します。 コミットメッセージは次のような形にする必要があります: 原文: <type>[optional scope]: <description> [optional body] [optional footer(s)] 訳: <型>[任意 スコープ]: <タイトル> [任意 本文] [任意 フッター] あな
Git の push --force は有害です。何故ならローカルの内容を無条件にリモートレポジトリを上書きしてしまい、チームメンバーがその間にプッシュしていた変更を上書きてしまうからです。しかし、これには改善策があります。強制プッシュがどうしても必要ではあるけれど、他人の作業を上書きしないようにしたいときは --force-with-lease というオプションを利用します。 Git の push --force は共有レポジトリにプッシュされた他の変更を破壊する可能性があるので、利用すべきではないことは良く知られています。常に完全に失われることにならなくても (もし変更が他人のワーキングツリーに存在していればマージすることは可能です)、これは無分別な対処であり、最悪の場合は大きな損害を招きます。何故なら --force というオプションはブランチの先頭をローカルの履歴に設定し、これまで
はじめに Gitのインデックスの中身、Gitのブランチの実装に続く、Gitの中身を見てみようシリーズです。Gitが管理するオブジェクトの種類や中身について見てみます。基本的にはPro Gitの10. Gitの内側をまとめなおしたものです。 オブジェクトの種類 Gitは、内部でファイルやコミットを「オブジェクト」として.git/objects以下に保存しています。オブジェクトには以下の4種類があります。 blobオブジェクト: ファイルを圧縮したもの。ファイルシステムの「ファイル」に対応 treeオブジェクト: Blobオブジェクトや別のTreeオブジェクトを管理する。ファイルシステムの「ディレクトリ」に対応 コミットオブジェクト: Treeオブジェクトを包んだもの。コミットのスナップショットに対応するTreeオブジェクトに、親コミット、コミットメッセージなどを付加する タグオブジェクト:
Gitのワークフロー、好みが分かれる分野で自転車置き場の議論にもなりがちだと感じている。基本的にはプロジェクトの流儀に素直に従い、余計なストレスを抱えないのが良いと考えている。例えば、私はマージコミットを作るのが好みだが、OSS活動等では「squash & mergeして」って言われることもあり、そういうときは当然素直に従うようにしている。 ということで、私のGitのワークフローについてのスタンスについて書いておこうと思う。私と一緒に働く人や、働くことを検討している人の参考になればと思います。もちろん、この辺りは、良い方向に変化もさせていきたい。例えばエントリー内でも触れていますが、私は昔はforce pushを禁止したいくらいでしたが、今は使っても良い、と思うようになりました。 Natureの特にGoでのバックエンド開発はこれに近い感じだとイメージしてもらえればと思います。ただ、できてな
個人用メモです。 「git gcってあんまし容量減らないよなぁ」 と思ったのが動機です。調べたけどパッと腑に落ちる記事がなかったので「自分で git のソースコード見た方がいいな」と急にモチベ発動してグワっと勉強しました。またついでに歴史改変の方法も調べたのですが、公式で既に WARNING が出てるほど非推奨化されてるfilter-branchを使用してる記事が多かったので、2021 年現在で多分一番推奨されてるfilter-repoを使ってやる方法もまとめました。 ちなみに容量減らしても高速化するかというとそこまで単純ではないです。そもそも減らさなくても partial clone で blob オブジェクトを必要最低限に指定して昔の blob をデフォルトで持ってこないようにしたり(--no-checkoutと併用するとより効果有る)、その後本当に自分が必要なやつだけ sparse-
Regarding Git and Branch Naming June 23, 2020 Both Conservancy and the Git project are aware that the initial branch name, ‘master’, is offensive to some people and we empathize with those hurt by the use of that term. Existing versions of Git are capable of working with any branch name; there's nothing special about ‘master’ except that it has historically been the name used for the first branch
EngineeringOpen SourceHighlights from Git 2.28The open source Git project just released Git 2.28 with features and bug fixes from over 58 contributors, 13 of them new. We last caught up with you on the… The open source Git project just released Git 2.28 with features and bug fixes from over 58 contributors, 13 of them new. We last caught up with you on the latest in Git back when 2.26 was released
CommunityOpen SourceCelebrating 15 years of Git: An interview with Git maintainer Junio HamanoGitHub is built on Git, and as Git celebrates its 15th anniversary, our own Jeff King interviews Git maintainer Junio Hamano about Git’s impact over the years. In celebration of Git’s 15th anniversary, GitHub’s Jeff King (@peff) interviewed Git’s maintainer Junio Hamano about Git’s 15 years and what’s com
FallenGameR's blog Чтобы зло восторжествовало, хорошим людям достаточно ничего не делать (Бёрк)
Git for Windows focuses on offering a lightweight, native set of tools that bring the full feature set of the Git SCM to Windows while providing appropriate user interfaces for experienced Git users and novices alike. Git BASH Git for Windows provides a BASH emulation used to run Git from the command line. *NIX users should feel right at home, as the BASH emulation behaves just like the "git" comm
ProductGit 2.17 is now availableA look at the new features in recent Git releases. The open source Git project just released Git 2.17.0, with features and bugfixes from over 60 contributors. Here’s our look at some of the most interesting new features from the last few versions of Git. Coloring moved code When you’re reviewing a commit that moves some code, its diff will show a big chunk of lines
初めに LinusによるGitのinitial commitのREADMEの訳です。 社内のSVNからの移行を促すために資料を整備していたのですが、SVNでやっていたことを移し替えたりコマンドを覚えたりするより内部構造を知ったほうが早いことに気づきました。 それで、gitの内部構造についての解説資料を色々見ていたのですが、データ構造については原作者のこのREADMEに言い尽くされている気がします。のみならず、gitを使うものが抱くべき精神性のようなものが示されており、深い感銘を覚えました(ヒャッハー)。 README: ”GIT - 馬鹿コンテンツトラッカー” コミットメッセージ:git, 地獄からきたインフォメーションマネージャ gitの意味 "git" は何を意味することも出来る、お前の気分次第だ。 3文字で、発音可能で、実際のUNIXシステムで共通コマンドとして使われていないものであ
EngineeringSHA-1 collision detection on GitHub.comA few weeks ago, researchers announced SHAttered, the first collision of the SHA-1 hash function. Starting today, all SHA-1 computations on GitHub.com will detect and reject any Git content that… A few weeks ago, researchers announced SHAttered, the first collision of the SHA-1 hash function. Starting today, all SHA-1 computations on GitHub.com wil
2015年も終わりになって、gitの基本的な使い方の話に更なる需要があるとは思っていないのですが 本日が私のAdventCalender担当日であることと、本日偶然遭遇したトラブルの都合上、もしかしたらまだ需要が微レ存かもしれないと思い記事を書いていきたいと思います。 まとめ 皆しとくといい。 git のデフォルト設定はどうなっているか gitはデフォルトではmergeコマンドを使った際に、mergeコミットを発生させる必要がない場合mergeコミットを発生せずにmergeを行うfast-forwardでのmergeを行うようになっている。 --no-ffというオプションを付けることで意図的にfast-forwardを行わないコミットをすることが出来る。 どういうトラブルが起こるか 仮にmasterにtopicAブランチをmergeしたとする。 fast-forwardであるmergeの場
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く