Loading...
    • 開発者ガイド
    • APIリファレンス
    • MCP
    • リソース
    • リリースノート
    Search...
    ⌘K
    リソース
    概要用語集システムプロンプト
    プロンプトライブラリCosmic KeystrokesCorporate clairvoyantWebsite wizardExcel formula expertGoogle apps scripterPython bug busterTime travel consultantStorytelling sidekick出典を引用SQL sorcererDream interpreterPun-ditCulinary creatorPortmanteau poetHal the humorous helperLaTeX legendMood colorizerGit gudSimile savantEthical dilemma navigatorMeeting scribeIdiom illuminatorCode consultantFunction fabricatorNeologism creatorCSV converterEmoji encoderProse polisherPerspectives pondererTrivia generatorMindfulness mentorSecond-grade simplifierVR fitness innovatorPII purifierMemo maestroCareer coachGrading guruTongue twisterInterview question crafterGrammar genieRiddle me thisCode clarifierAlien anthropologistData organizerBrand builderEfficiency estimatorReview classifierDirection decoderMotivational museEmail extractorMaster moderatorLesson plannerSocratic sageAlliteration alchemistFuturistic fashion advisorPolyglot superpowersProduct naming proPhilosophical musingsSpreadsheet sorcererSci-fi scenario simulatorAdaptive editorBabel's broadcastsTweet tone detectorAirport code analyst
    Console
    Log in
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...

    Solutions

    • AI agents
    • Code modernization
    • Coding
    • Customer support
    • Education
    • Financial services
    • Government
    • Life sciences

    Partners

    • Amazon Bedrock
    • Google Cloud's Vertex AI

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Company

    • Anthropic
    • Careers
    • Economic Futures
    • Research
    • News
    • Responsible Scaling Policy
    • Security and compliance
    • Transparency

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Help and security

    • Availability
    • Status
    • Support
    • Discord

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy
    プロンプトライブラリ

    Git gud

    ユーザーが説明したバージョン管理アクションに基づいて適切なGitコマンドを生成します。

    このプロンプトを開発者Consoleにコピーして、ご自身で試してみてください!

    RoleContent
    Userローカルファイルにいくつかの変更を加えました。これらをローカルのGitリポジトリに保存したいと思います。どのGitコマンドを使用すべきでしょうか?

    出力例

    ローカルファイルに加えた変更をローカルのGitリポジトリに保存するには、以下のGitコマンドを使用する必要があります:

    1. git add . または git add <file>

      • このコマンドは、あなたが行った変更をステージングし、コミットの準備をします。.は現在のディレクトリとそのサブディレクトリ内のすべての変更を追加します。特定のファイルのみをステージングしたい場合は、.をファイル名またはパスに置き換えてください。
    2. git commit -m "Your commit message"

      • このコマンドは、ステージングされた変更をローカルのGitリポジトリにコミットします。-mフラグを使用すると、行った変更を説明するコミットメッセージを提供できます。"Your commit message"を変更の簡潔で説明的な要約に置き換えてください。

    例えば、example.txtという名前のファイルに変更を加えた場合、以下を実行します:

    git add example.txt
    git commit -m "Update example.txt with new content"
    

    これらのコマンドは、提供されたメッセージで新しいコミットを作成し、ローカルのGitリポジトリに変更を保存します。後でこれらの変更をリモートリポジトリにプッシュしたり、ローカルブランチでの作業を続けることができます。

    ターミナルまたはコマンドプロンプトで、Gitリポジトリディレクトリ内からこれらのコマンドを実行することを忘れないでください。


    APIリクエスト

    • APIリクエスト