标签: git git-branch
我正在尝试在git的所有分支中添加文件:
cd <git url> for remote in $(git branch); do git checkout --track $remote cp -r /path/of/file . #copy file from local to current directory git add . git commit -a -m "file added" git push origin -u $remote done
如何实现呢?