0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Gitコマンド拡張の作り方 & GitHub上のファイルのURLをローカルのファイルPATHに変換するコマンド作った

Last updated at Posted at 2025-08-31

PATHが通るところに、git-<コマンド名>というファイルを置けばOKらしい。たとえばLinuxであれば、/usr/local/binはだいたいPATHが通っているので、/usr/local/bin/git-my-commandとか作っておけば、git my-commandという感じで実行できる。

最近、コードレビューが多くなったので、ブランチ変えたりとか色々Git操作が増えた気がしており、プラグイン作るの楽しそうと思った次第。

今回せっかくなのでつくったのが、GitHub上のファイルのURLをローカルのファイルPATHに変換するプラグインである

GitHubのPRから変更対象のファイルを見ているときに、ちょいGitHub上じゃ辛いからローカルで見ようってときに、じゃあどこだっけ?となることがよくあるので作ってみた。

git path-from-url <GitHubのURL>という感じで実行できる。ちょい普段の作業が楽になるかも?

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?