並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 30 件 / 30件

新着順 人気順

git-commitの検索結果1 - 30 件 / 30件

タグ検索の該当結果が少ないため、タイトル検索結果を表示しています。

git-commitに関するエントリは30件あります。 gitGitHubgithub などが関連タグです。 人気エントリには 『git commit --fixup が便利 - Qiita』などがあります。
  • git commit --fixup が便利 - Qiita

    始めに 私は最近エンジニアに復帰し、現場で便利に思ったことを今後記事にできたらと思っています。 そして1発目は、gitのオプションについて記事を書いてみようと思います。 --fixup はどんな時に使えるの? Pull Requestなどで、軽微な指摘や後から気付いた修正など、本来の機能のコミットとは別に修正コミットを残すのは少し嫌な時がありますよね。 コミットが一つ手前であれば、直前のコミットを修正してくれる git commit --amendなどで対応できますが、3つ前のコミットに修正を混ぜ込みたい時などは、少し大変。 そんな時に便利なのが、この git commit --fixupです。 使い方 例えば、下記のコミットの状況で、Fix article pageのコミットに対して、追加の修正をしたいとする。 ❯ git log --oneline 1131338365 (HEAD -

      git commit --fixup が便利 - Qiita
    • git commit --fixupを使いましょう - Don't Repeat Yourself

      発端 Pull Request で force push されると差分がわからなくなるから困るんだけどみんなどうしてますか?— codehex.bsky(へっくす) (@codehex) 2024年2月25日 ポストの前提がちょっとわかりませんが、レビュー後にforce pushされると、どこに修正を入れたのかわからないケースだと仮定します。プルリクエストがまだドラフト状態でのforce pushやrebaseで困るケースはそんなにないと思うからです。 git commit --fixup このケースではgit commit --fixupが便利です。レビューで指摘が入ったコミットに対して--fixupをかけておき、レビュワーはfixupコミットの内容を確認します。レビュワーが確認してOKが出た段階で、git rebase -i --autosquashなどを使ってfixupコミットを元コ

        git commit --fixupを使いましょう - Don't Repeat Yourself
      • コミット履歴を綺麗にするときの`git commit --fixup`と`git rebase --autosquash` - 理系学生日記

        Pull Request(PR)やMerge Request(MR)を作る中で、コミット履歴はできるだけ綺麗にしておきたいものです。 プルリクエストについて - GitHub Docs Merge requests | GitLab ぼくはあまりコミット履歴の綺麗さを気にしない方でした。 しかし大きめのPRやMRをレビューする側に回ると、「変更のまとまり」が追えないと「なぜこの変更をしたのか」が非常に追いにくくなります。 だからこそ最近は、コミット履歴をかなり意識するようになりました。 その時に活躍しているのが、タイトルの通りgit commit --fixupとgit rebase --autosquashです。 git commit --fixup git rebase --autosquash そのほかおすすめ git commit --fixup git commit --fixu

          コミット履歴を綺麗にするときの`git commit --fixup`と`git rebase --autosquash` - 理系学生日記
        • VS Code + GitHub Copilot 環境でも git commit しちゃうんだな、これが

          VS Code でコミットするときに GitHub Copilot を使っていると コミットメッセージを生成してくれたりします。 図 1 コミットメッセージを Copilot で生成 英語苦手な自分からすると「マジうれしいんですけど」という感じなのですが、コミットメッセージはできればエディターで記述したいと考えてしまいます。 そこで今回は「コミットメッセージをエディターで編集する利便性」を維持しつつ、「GitHub Copilot による生成機能もできるだけ利用しよう」という内容のメモになります。 VS Code のエディターでコミットメッセージを記述するとは VS Code でコミットメッセージを記述する方法としてはソース管理タブの利用が一般的かと思われます。 図 1-1 ソース管理タブのフィールドから普通に入力 一方で上記とは別に、コミット用のコマンドを実行しエディターの中で記述する方

            VS Code + GitHub Copilot 環境でも git commit しちゃうんだな、これが
          • プログラミング初心者はgit commitする前に必ずdiffを自分でレビューするクセを付けよう - give IT a try

            プログラミング初心者向けのTipsです。 まあ、タイトルに書いたとおりなんですが、プログラミング初心者は(というか、プログラマならみんな)git commitする前にdiffを自分でチェックするようにしましょう。 それはなぜか? しょーもないミスを自分で見つけるためです。 しょーもないミスというのは例えば、消し忘れのコメントや、デバッグ用に書き込んだprint文、無駄な空行、おかしなインデント、管理対象外とすべき一時ファイルや隠しファイル等々です。 def create @book = Book.new(book_params) puts @book.title # ほら、デバッグ用のputsが残ってるよ!! if @book.save redirect_to @book, notice: '登録しました' else render :new # インデントが1文字ズレてるよ!! end e

              プログラミング初心者はgit commitする前に必ずdiffを自分でレビューするクセを付けよう - give IT a try
            • secretlint を使って機密情報を git commit できない環境を作る | DevelopersIO

              AWSアクセスキーセキュリティ意識向上委員会って何? 昨今、AWSのアクセスキーを漏洩させてしまうことが原因でアカウントへの侵入を受け、 多額の利用費発生・情報漏洩疑いなど重大なセキュリティ事案が発生するケースが実際に多々起きています。 そこで、アクセスキー運用に関する安全向上の取組みをブログでご紹介する企画をはじめました。 アクセスキーを利用する場合は利用する上でのリスクを正しく理解し、 セキュリティ対策を事前に適用した上で適切にご利用ください。 tl;dr 開発をはじめる前に、次の手順を実行しよう シェルスクリプトの保存 次のシェルスクリプトを ~/.git-template/hooks/pre-commit として保存しよう。 #!/bin/sh FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\

                secretlint を使って機密情報を git commit できない環境を作る | DevelopersIO
              • My favourite Git commit

                I like Git commit messages. Used well, I think they’re one of the most powerful tools available to document a codebase over its lifetime. I’d like to illustrate that by showing you my favourite ever Git commit. This commit is from my time at the Government Digital Service, working on GOV.UK. It’s from a developer by the name of Dan Carley, and it has the rather unassuming name of “Convert template

                • 「Git for Windows 2.40.0」が公開 ~git-commitなどの「-」系コマンドが廃止/「git jump」が「Emacs」にも対応。Windows 7/8.xのサポートは間もなく廃止

                    「Git for Windows 2.40.0」が公開 ~git-commitなどの「-」系コマンドが廃止/「git jump」が「Emacs」にも対応。Windows 7/8.xのサポートは間もなく廃止
                  • GitHub - Nutlope/aicommits: A CLI that writes your git commit messages for you with AI

                    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. Dismiss alert

                      GitHub - Nutlope/aicommits: A CLI that writes your git commit messages for you with AI
                    • php.internals: Changes to Git commit workflow

                      Hi everyone, Yesterday (2021-03-28) two malicious commits were pushed to the php-src repo [1] from the names of Rasmus Lerdorf and myself. We don't yet know how exactly this happened, but everything points towards a compromise of the git.php.net server (rather than a compromise of an individual git account). While investigation is still underway, we have decided that maintaining our own git infras

                      • git commit --fixup と git rebase --autosquash で簡単に commit が整理できて感動した話

                        git commit --fixup と git rebase --autosquash で簡単に commit が整理できて感動した話 Written by @ryysud Apr 2, 2019 00:07 · 2636 words · 6 minutes read #git よくある面倒なシチュエーション PR を作成した際に、開発中にメインとなる実装の commit とは別に、レビューを受けての修正であったり、ちょっとしたリファクタリングであったり、typo 修正などの細かな commit を、PR の中で粛々と対応するシチュエーションは、どなたにも経験があることだと思います。そして、マージ前に git rebase -i を使って commit を整理するにしても、エディタを開き、どれがどれに紐付く commit なのかをマッピングするのは非常に面倒な作業だと思います。 そこで今

                          git commit --fixup と git rebase --autosquash で簡単に commit が整理できて感動した話
                        • どのバージョンでビルドされたかを記録するgit-commit-id-maven-pluginを使ってみる - Qiita

                          はじめに 個人開発や、CI/CDが整っていない開発運用環境だと、このライブラリって、どのGitの断面でビルドされたものなのだろう、、とわからなくなって困ったことは無いでしょうか? 旧時代的には、ビルド直後にMD5などでハッシュ値を取って、その番号をどのリリースバージョンか台帳などに記録、それによりこのライブラリはこのバージョンだね、とかしていました。 MevenCentralリポジトリでも、大体のライブラリはmd5ファイルも保管してあります。 ビルド後にライブラリが意図せず改変されていないことを確認するためには妥当だとは思いますが、自分でビルドしたものだとこの確認方法と管理はちょっとやりすぎ(大変)な感じがします。 そこでGitのブランチやコミットIDがライブラリ内にファイルとして含むことができるMavenプラグインである、git-commit-id-maven-pluginをご紹介します

                            どのバージョンでビルドされたかを記録するgit-commit-id-maven-pluginを使ってみる - Qiita
                          • コミットの修正には git commit --amend が便利 - RAKUS Developers Blog | ラクス エンジニアブログ

                            はじめに はじめまして。新卒1年目のtakaramです。 今回は、Gitのコミットで失敗した時に便利な「git commit --amend」コマンドをご紹介します。 目次 はじめに 目次 git commit --amend とは このコマンドでできること コミットメッセージの修正 コミット内容を後から追加 このコマンドでできないこと コミットからファイルを削除する 2つ以上前のコミットを修正する おわりに git commit --amend とは その前に、そもそも amend という単語自体あまり耳慣れないかもしれません。辞書によれば、"amend"=「修正する、改める」という意味です。 そしてgit commit --amendもまさに「直前のコミットを修正する」ためのコマンドなのです。 このコマンドでできること このコマンドで出来るのは、 コミットメッセージの修正 コミット内容

                              コミットの修正には git commit --amend が便利 - RAKUS Developers Blog | ラクス エンジニアブログ
                            • GitHub Actions上でgit commitするときにgit userをどうするか - Qiita

                              GitHub Actions上で変更をコミットしたい GitHub Actions上で変更をコミットしたいケースがある。例えばGitHub Actions上でlintを実行して修正を自動反映したいケース。 このときgit configコマンドでどのユーザのcommitにするか指定する必要がある。 実際にはどのユーザを指定すればよいか。 ユーザの設定方法 GitHub Actions上で git config user.email <メールアドレス> を実行する。 GitHubではgit userのメールアドレスでユーザ識別されるので、GitHubユーザで登録したメールアドレスと一致していればよい。 on: push jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - run: | date > g

                                GitHub Actions上でgit commitするときにgit userをどうするか - Qiita
                              • Changes to Git commit workflow - Externals

                                Hi everyone, Yesterday (2021-03-28) two malicious commits were pushed to the php-src repo 1 from the names of Rasmus Lerdorf and myself. We don't yet know how exactly this happened, but everything points towards a compromise of the git.php.net server (rather than a compromise of an individual git account). While investigation is still underway, we have decided that maintaining our own git infrastr

                                • My favourite Git commit

                                  I like Git commit messages. Used well, I think they’re one of the most powerful tools available to document a codebase over its lifetime. I’d like to illustrate that by showing you my favourite ever Git commit. This commit is from my time at the Government Digital Service, working on GOV.UK. It’s from a developer by the name of Dan Carley, and it has the rather unassuming name of “Convert template

                                  • GitHub Actions で変更があるときだけ git commit & push する

                                    continue-on-error を使う方法を新たに記事にしました。 以下の内容は非推奨です。参考として残しておきます。 GitHub Actions で変更があるときだけ git commit & push する方法を 2 種類。 方法 1 : シェルスクリプト完結 通常のシェルスクリプトの if ! git diff --exit-code --quiet で判定。 steps: - uses: actions/checkout@v2 - name: 変更があるかもしれないしないかもしれない run: ./script.sh - name: commit & push run: | git add -N . # 新規ファイルを含める if ! git diff --exit-code --quiet then git config user.name github-actions g

                                      GitHub Actions で変更があるときだけ git commit & push する
                                    • git.postgresql.org Git - postgresql.git/commit

                                      Doc: use "an SQL" instead of "a SQL" Although which is correct depends entirely on whether you pronounce SQL as "ess-que-ell" or "sequel", we have standardized on the former in our user-facing documentation, so use the correct article according to that pronunciation. Discussion: https://postgr.es/m/CAApHDvp3osQwQam+wNTp9BdhP+QfWO6aY6ZTixQQMfM-UArKCw@mail.gmail.com

                                      • 【Git入門】git commitを取り消したい、元に戻す方法まとめ - RAKUS Developers Blog | ラクス エンジニアブログ

                                        git commit を取り消したい、元に戻す方法 はじめに こんにちは、新卒2年目のtsudachantanです。 チーム開発にとっても便利なバージョン管理システム「Git」……ですが、 「add して commit して pushして…」そこまではわかるけど、それ以外はいまいちわからない。 そんな状況の、Gitを使い始めたばかりの方が一番最初につまづくのは「commitの取り消し方」ではないでしょうか。 各コマンドがどのような動きをしているのか把握しないまま操作をすると 業務を行う上で、チームの開発ではなおさら支障をきたしかねません。 そこで、初心者の私が混乱しがちだった、「間違えてgit commitしてしまった場合」の対処法について、 自分自身の学習を兼ねて、Gitに慣れていない方に向けて簡単に説明していきたいと思います。 コミットの修正によく利用するGitコマンドをシーン別に分け

                                          【Git入門】git commitを取り消したい、元に戻す方法まとめ - RAKUS Developers Blog | ラクス エンジニアブログ
                                        • 【令和最新版】PGP鍵の作り方から管理方法、Git Commitへの署名まで - Qiita

                                          はじめに この記事は限界開発鯖 Advent Calendar 2022の11日目の記事です。 PGP(OpenPGP)とは? PGPは Pretty Good Privacy の略で、電子メールなどで使用できるデジタル署名のプロトコルの一つです。OpenPGPはそれをオープンな規格にしたもので、RFC 4880などで標準化されています。 OpenPGPは規格なので規格に沿っていれば自由に実装することが可能です。その中でも特に有名なのがGNUによるGnuPG( GNU Privacy Guard )です。GnuPGでは暗号化や署名などの様々な操作をすることができ、これらを電子メールやGit Commitの署名などに活用することが出来ます。GnuPG自体はOpenPGPの実装の一つに過ぎないのですが、かなり有名なため、PGPとGPGが混同されて使用されることも多々あります。 以後PGP鍵の作

                                            【令和最新版】PGP鍵の作り方から管理方法、Git Commitへの署名まで - Qiita
                                          • git commit を取り消して元に戻す方法、徹底まとめ | WWWクリエイターズ

                                            Git における、git commit の取り消し方法や、やり直し操作に関する方法をまとめました。Git はどんなコミットでもすべてを記録していますので、一度間違えたとしても、いつでも昔の記録からもとに戻せ事が保証されています。 取り消しや、やり直し方法をマスターすれば、バージョン管理ツールとしてのメリットを最大限享受することができます。 git commit の取り消し方法、6選 コミットした直後に「あっ、この変更入れ忘れた!」「あっ、いらないファイルを混ぜてコミットしちゃった!」など、確認不足による間違いは、時間に追われるエンジニアに非常にしばしば発生します。そのような間違いコミットは、まだpushしていなければ、容易に取り消したり、その後コミットをやり直すことができます。 コミットの取り消しにまつわるケースを、下記の6種類に分けてご紹介します。 直前の git commit 実行を取

                                            • Git:git commitとDescription部分の登録方法について - tyoshikawa1106のブログ

                                              Gitコマンドでコミットするとき次のように『-m』をつかうとコミットのタイトルを登録できます。 $ git commit -m "コミットメッセージ" GitHubやBitBucketのページや、SourceTreeなどのツールからコミットするときはタイトルだけでなく説明文(Description)も登録することができます。 Gitコマンドからでも登録できないのかなと検索したところ、次の記事が見つかりました。 次のように書くことでDescription部分も登録できるみたいです。 git commit -m "Title" -m "Description .........."; こんな感じで実行してみました。 $ git commit -m "枠組み作成" -m "Node.js & AngularJsのサンプルコードをまとめたリポジトリを作成" 結果はこちら。無事に登録できたみたいです

                                                Git:git commitとDescription部分の登録方法について - tyoshikawa1106のブログ
                                              • GitHub - jevakallio/git-notify: 🙉 📣 Communicate important updates to your team via git commit messages

                                                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. Dismiss alert

                                                  GitHub - jevakallio/git-notify: 🙉 📣 Communicate important updates to your team via git commit messages
                                                • Github Actionsを使ってgit commitとgit pushを自動化しよう。 - ポンコツエンジニアのごじゃっぺ開発日記。

                                                  Github Actionsで作業の自動化をするのって楽しいですよね。 今回は、actions上でファイルを変更したり追加して、最後にgitコマンドでコミット&プッシュをしたいと思います。 GITHUB_TOKENの設定 workflowのyml定義 git configって必要なの? git pullでwarningが出るかも? 実行結果 GITHUB_TOKENの設定 不要です! 自分も初めてGithub Actions上でgitコマンドを操作するときは必要なのかなと思ってたんですが、どうやら不要なようです。 なので、GITHUB_TOKENの存在は一旦忘れます。 もしかしたら他のリポジトリを扱う場合とかは必要なのかも。 以下で紹介するymlファイルを作成するだけでした! workflowのyml定義 さて、早速定義ファイルを紹介したいと思います。 name: Test on: pus

                                                    Github Actionsを使ってgit commitとgit pushを自動化しよう。 - ポンコツエンジニアのごじゃっぺ開発日記。
                                                  • git commit accepts several message flags (-m) to allow multiline commits

                                                    This post is part of my Today I learned series in which I share all my web development learnings. When you use git on the command line you might have used the message flag (-m). It allows developers to define commit messages inline when calling git commit. git commit -m "my commit message" I'm not the biggest fan of this approach because I prefer to edit the commit message in vim (which I only use

                                                      git commit accepts several message flags (-m) to allow multiline commits
                                                    • Use a Git commit message template to write better commit messages

                                                      git-commit-template.md Using Git Commit Message Templates to Write Better Commit Messages The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly a

                                                        Use a Git commit message template to write better commit messages
                                                      • husky(v7)でgit commit時にESLint/Prettier/commitlintを動かす

                                                        huskyのバージョンはv7を使います。もしv4を入れている場合は、手順が異なりますのでご注意ください。ちなみに、パッケージマネージャーはyarnを使います。 ESLint/Prettierの設定確認 ESLintやPrettierの導入は、本記事が冗長になるため割愛します。既にESLintやPrettierがインストール済みで、package.jsonが以下の設定になっていることが前提で書きます。 "scripts": { "lint": "eslint --fix src/**/*", "format": "prettier -w src/**/*", "fix": "yarn format && yarn lint" }

                                                          husky(v7)でgit commit時にESLint/Prettier/commitlintを動かす
                                                        • ObsidianでiPhoneからGit Commitする

                                                          WikiWikiWeb というコンセプトが好きで、そのコンセプトが含まれている Obsidian や Scrapbox が好きです。Obsidian には、obsidian-git という Git 連携のプラグインがあります。こちらには、デスクトップだけでなく、モバイルからでも Git Commit できます。 そこで、私が持ってる iPhone を使って、Obsidian で Git Commit する手順を紹介します。 手順 iPhone から https://obsidian.md/ にアクセスし、アプリをダウンロード アプリを開いて、Create new vault をタップ Vault name に、適当な名前を入力 (後で変更可能)し、Create をタップ 左上のサイドバーアイコン → 設定アイコン → コミュニティプラグイン → コミュニティプラグインを有効化 の順でタップ

                                                            ObsidianでiPhoneからGit Commitする
                                                          • GitHub - jorisroovers/gitlint: Linting for your git commit messages

                                                            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. Dismiss alert

                                                              GitHub - jorisroovers/gitlint: Linting for your git commit messages
                                                            • My favourite Git commit (2019) | Hacker News

                                                              For better or worse, my experience as a GitHub cofounder and author of several Git books (Pro Git, etc) is that the Git commit message is a unique vector for code documentation that is highly sub-optimal.The main issue is that most of the tooling (in Git or GitHub or whatever) generally only shows the first line. So in the case of this commit example would be the very simple message of a generic "

                                                              1

                                                              新着記事