Home›VS Code / Dev Env›QiitaをGitHubリポジトリで管理して草も生やす|VSCodeとターミナルだけで書いて公開する手順
QiitaをGitHubリポジトリで管理して草も生やす|VSCodeとターミナルだけで書いて公開する手順

QiitaをGitHubリポジトリで管理して草も生やす|VSCodeとターミナルだけで書いて公開する手順Manage Qiita Articles in a GitHub Repository and Grow Your Contribution Graph: Write and Publish with Just VSCode and a Terminal

元記事を読むRead original articleqiita.com(新しいタブで開きます)(opens in a new tab)
AI 要約AI summary
  • 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.

  1. ポコPokoQiitaの記事を書くとき、普段の作業って何が変わるの?When I write a Qiita post, what actually changes in my usual routine?
  2. 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.
  3. ポコPoko前はGitで履歴を見ながら書けなかったの?So I couldn't track history with Git before?
  4. 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.
  5. ポコPoko草は、pushして初めて生えるんだね。Actionsの自動コミットは草にならないのも覚えておくね。So the contribution graph only fills after a push. And I'll remember that automated Actions commits don't count.
  6. 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.
記事情報・収集記録Article details & collection record
出典Source
Qiita VSCodeコミュニティCommunity
公開日時 (JST)Published (JST)
収集日時 (JST)Collected (JST)
配信形式Format
ブログBlog
原文言語Source language
日本語Japanese
重要度の位置づけImportance in this lane
MediumMedium priority(VS Code / Dev Env 56件中、同等以上 49件)(49 of 56 VS Code / Dev Env entries are equal or higher)
出典の平均重要度(掲載直近 30 件・最大 30 件)Source average (last 30 listed, up to 30)
1.9 / 31=情報 · 2=中 · 3=高1=Info · 2=Medium · 3=High
情報の寿命Half-life
中期 (チュートリアル)Medium-term (tutorial)

🔷VS Code / Dev Env の他の記事More from VS Code / Dev Envもっと見る →View more →

日本語プログラミング言語ドリトル をVSCodeターミナルでビルドできる環境を構築(CLIラッパークラスの実装)
日本語プログラミング言語ドリトル をVSCodeターミナルでビルドできる環境を構築(CLIラッパークラスの実装)Building a Setup to Compile the Japanese Programming Language Dolittle from the VSCode Terminal (Implementing a CLI Wrapper Class)
Qiita VSCode1d ago
ないならば、作ってしまおう、デバッガー ~VS Code 拡張編~ x86 の C# を VS Code で止める
ないならば、作ってしまおう、デバッガー ~VS Code 拡張編~ x86 の C# を VS Code で止めるIf It Doesn't Exist, Build It: A Debugger as a VS Code Extension for Breaking on x86 C#
Qiita VSCode2d ago
ChromeOSのLinux環境でVS Codeに日本語入力:fcitx不要、必要だった起動オプションは3つ
ChromeOSのLinux環境でVS Codeに日本語入力:fcitx不要、必要だった起動オプションは3つJapanese Input in VS Code on ChromeOS Linux: No fcitx Needed, Just Three Launch Options
Qiita VSCode3d ago
「送り仮名を無視する言語」のために Language Server を作った話 ― 日本語プログラミング言語 Mind の VS Code 拡張
「送り仮名を無視する言語」のために Language Server を作った話 ― 日本語プログラミング言語 Mind の VS Code 拡張Building a Language Server for a Language That Ignores Okurigana: A VS Code Extension for the Japanese Language Mind
Qiita VSCode3d ago
[VSCode / SSH] リモートサーバに接続しようとした時に got bad result from install script と表示されてアクセスできない
[VSCode / SSH] リモートサーバに接続しようとした時に got bad result from install script と表示されてアクセスできない[VSCode / SSH] Cannot Connect to Remote Server: "got bad result from install script" Error
Qiita VSCode3d ago
VScodeの拡張機能で自前 SSL 証明書を信頼する方法
VScodeの拡張機能で自前 SSL 証明書を信頼する方法How to Make VS Code Extensions Trust a Self-Signed SSL Certificate
Qiita VSCode4d ago
ページ上部へScroll to top