Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
コマンドラインで実行するgit branchと、レポのすべてのブランチのリストが取得されますが、サブシェルで実行する$(git branch)と、最初にレポの最上位フォルダーにあるファイルのリストが出力されてから、ブランチが出力されます名前。なんで?
git branch
$(git branch)
基本的に、for ループを使用してブランチを繰り返し処理しようとしていますが、ファイルの一覧表示によってスクリプトが壊れてしまいます。
for i in $(git branch); do echo $i done