
QiitaをGitHubリポジトリで管理して草も生やす|VSCodeとターミナルだけで書いて公開する手順Manage Qiita Articles in a GitHub Repository and Grow Your Contribution Graph: Write and Publish with Just VSCode and a Terminal
- Qiita CLIとGitHub連携を使い、記事をVSCodeとGitで執筆・公開するワークフローを解説する。
- Node.js 22.22.1以上が必要で、草はデフォルトブランチへのpushで付き、Actionsの自動コミットは対象外。
- 履歴管理しつつ発信したい人に役立つ。
Explains a workflow using Qiita CLI and GitHub integration to write and publish Qiita posts from VSCode and Git. It needs Node.js 22.22.1+, and only pushes to the default branch count toward contributions, helping writers track history.
AI 生成の要約と解説(解説は要約と収集メタデータに基づく)で、元記事全文の転載・翻訳ではありません。日本語版と英語版は言語ごとに独立して生成しています。正確性は元記事 (qiita.com) でご確認ください。AI-generated summary and explainer (the latter based on the summaries and collected metadata), not a copy or translation of the full source article. Generated independently for each language. Verify accuracy at the original source (qiita.com).
Qiitaの記事をブラウザのエディタではなく、普段使いのVSCodeとGitで書いて公開する方法が紹介されている。記事を書いてコミットし、pushするたびにGitHubへ履歴が積まれるため、アウトプットとコントリビューション(草)を同時に増やせるという内容だ。
Qiita CLIと連携
使うのは、Qiita公式の「Qiita CLI」と「GitHub連携」である。執筆から公開までの流れを、VSCodeとターミナルだけで完結させる手順としてまとめている。なお元記事はスクリーンショットを使わず、文章のみで構成されている。
Gitで管理する利点として、履歴を追えることが挙げられている。「あの表現、前はどう書いてた?」といった疑問にもすぐ答えられる、と説明されている。
草が生える条件
注意したいのは、草が付くタイミングだ。git addした時点ではなく、コミットをデフォルトブランチへpushしたときに付く。
また、Actionsが自動で積む「Updated by qiita-cli」というコミットは、自分の草にはならない。Privateリポジトリのコミットについては、GitHubのプロフィール設定で「Include private contributions on my profile」を有効にしている場合に限り、草へ反映される。
必要な環境
Qiita CLIの実行にはNode.jsが必要で、バージョンは22.22.1以上とされている。これはQiita CLI 1.13.0の要件で、手元のバージョンは node -v で確認できる。
空のリポジトリ
最初の作業として、GitHubで空のリポジトリを作成する。記事中の例では名前を qiita_contents としている。PublicでもPrivateでも動作するが、Privateの場合は上述のとおり、草に反映させるためにプロフィール側の設定が必要になる。
エディタで書き、Gitで履歴を残し、pushで公開と記録を同時に行う。この流れを自分の環境に取り入れたい人に向けた手順の解説である。
Qiita CLI と GitHub連携
This article explains how to manage Qiita posts in a GitHub repository instead of writing them in the browser editor. According to the source, the aim is to write in a familiar editor (VSCode) with Git, so that each commit and push builds a history on GitHub and contributes to the contribution graph, the "草" of the title.
The method relies on two official pieces: Qiita CLI and its GitHub integration. The article says the whole flow can be completed with only VSCode and a terminal. It notes that it has no screenshots, because the author found uploading to Gyazo and inserting images tedious.
履歴管理 with Git
One benefit the article names is version history. With Git, a writer can quickly check questions like how a particular phrase was worded before. Each time an article is written, committed, and pushed, the history accumulates on GitHub, which the author describes as growing output and contributions at the same time.
草が生えるのは push のとき
The article is specific about when the contribution graph updates. A square appears not when you run git add, but when a commit is pushed to the default branch. Commits that Actions adds automatically, labeled "Updated by qiita-cli", do not count toward your own graph.
Private repositories get a separate condition. Commits there show up on the graph only if you enable "Include private contributions on my profile" in your GitHub profile settings.
Node.js 22.22.1以上
Running Qiita CLI requires Node.js 22.22.1 or later. The article gives this as the requirement for Qiita CLI 1.13.0 and suggests checking your installed version with node -v.
For the repository, you start by creating an empty one on GitHub, with qiita_contents given as an example name. The article says it works whether the repository is Public or Private, though the graph behavior for Private repositories depends on the profile setting described above.
In short, the piece is aimed at people who want to publish on Qiita while keeping their writing under Git control, and it highlights the Node.js version requirement and the rules for what counts toward contributions.
ポコとTECHガイドPoko & TECH Guide
ポコと当サイトのTECHガイドが、記事の要約と収集した情報から読みどころを語るAI生成の対話です。Poko and TECH Dashboard's own TECH Guide discuss the article's highlights in an AI-generated conversation based on its summary and collected source details.
- ポコPokoQiitaの記事を書くとき、普段の作業って何が変わるの?When I write a Qiita post, what actually changes in my usual routine?
- TECHガイドTECH Guideブラウザのエディタではなく、普段のVSCodeとGitで書けます。コミットしてpushするたびにGitHubに履歴が積まれる流れです。You write in your usual VSCode and Git instead of the browser editor. Each commit and push adds history on GitHub.
- ポコPoko前はGitで履歴を見ながら書けなかったの?So I couldn't track history with Git before?
- TECHガイドTECH Guideこの記事では、従来のやり方との細かい比較までは書かれていません。ただ、Gitなら「前はどう書いてた?」がすぐ分かる点は挙げられています。The article doesn't compare it in detail with the old way. It does say Git lets you quickly check how you wrote something before.
- ポコPoko草は、pushして初めて生えるんだね。Actionsの自動コミットは草にならないのも覚えておくね。So the contribution graph only fills after a push. And I'll remember that automated Actions commits don't count.
- TECHガイドTECH Guideそうですね。デフォルトブランチへのpushが条件です。あとはNode.js 22.22.1以上が必要なので、node -vで確認しておきたいですね。Right, it has to be a push to the default branch. Also, Node.js 22.22.1 or higher is required, so check with node -v first.
匿名の公開いいねです。記事の保存・お気に入りではなく、Featured、Top 3、重要度、掲載順位には影響しません。仕組みとプライバシーAnonymous public likes are reactions, not saved articles or bookmarks. They do not affect Featured, Top 3, importance, or listing order.How it works and privacy




![[VSCode / SSH] リモートサーバに接続しようとした時に got bad result from install script と表示されてアクセスできない](https://qiita-user-contents.imgix.net/https%3A%2F%2Fqiita-user-contents.imgix.net%2Fhttps%253A%252F%252Fcdn.qiita.com%252Fassets%252Fpublic%252Farticle-ogp-background-afbab5eb44e0b055cce1258705637a91.png%3Fixlib%3Drb-4.1.1%26w%3D1200%26blend64%3DaHR0cHM6Ly9xaWl0YS11c2VyLXByb2ZpbGUtaW1hZ2VzLmltZ2l4Lm5ldC9odHRwcyUzQSUyRiUyRnFpaXRhLWltYWdlLXN0b3JlLnMzLmFtYXpvbmF3cy5jb20lMkYwJTJGMzI3NDA3JTJGcHJvZmlsZS1pbWFnZXMlMkYxNTQ0OTUyMTkzP2l4bGliPXJiLTQuMS4xJmFyPTElM0ExJmZpdD1jcm9wJm1hc2s9ZWxsaXBzZSZiZz1GRkZGRkYmZm09cG5nMzImcz0yZmQ0MmM3NzYxNWFhYmRjM2FiNWRjMzllNWJlMTdjMw%26blend-x%3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