Google repo 可以报告当前分支在远程之前吗?
Can Google repo report on current branch being ahead of remote?
在单个 git
回购中我可以做到:
<project2 root dir>$ git status
On branch feature/feature_release
Your branch is ahead of 'origin/feature/feature_release' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
但是,使用 repo
,我得到:
$ repo status
project <project1 root dir>/ branch feature/feature_release
project <project2 root dir>/ branch feature/feature_release
project <project3 root dir>/ branch feature/feature_release
这并没有告诉我,例如,project2
有需要推送的本地更改。如果我尝试 forall
我得到这个:
$ repo forall -c "git status -sb"
...
## feature/feature_release...origin/feature/feature_release [ahead 1]
## HEAD (no branch)
## feature/feature_release...origin/feature/feature_release
## feature/feature_release...origin/feature/feature_release [ahead 1]
## feature/feature_release...origin/feature/feature_release [ahead 1]
## feature/feature_release...origin/feature/feature_release
## HEAD (no branch)
## HEAD (no branch)
...
repo
是否有一种内置的方法来做一些事情,比如在项目名称前加上:
## <project1 root dir>/ feature/feature_release...origin/feature/feature_release [ahead 1]
## <project2 root dir>/ HEAD (no branch)
## <project3 root dir>/ feature/feature_release...origin/feature/feature_release
## <project4 root dir>/ feature/feature_release...origin/feature/feature_release [ahead 1]
我想从 repo start
开始会有所帮助,但我从来没有让它发挥作用。
我 RTFM 更进一步,-p
标志似乎是我要找的大部分内容:
$ repo forall -pc "git status -sb"
...
project <project1 root dir>/
## feature/feature_release...origin/feature/feature_release [ahead 1]
project <project2 root dir>/
## HEAD (no branch)
project <project3 root dir>/
...
在单个 git
回购中我可以做到:
<project2 root dir>$ git status
On branch feature/feature_release
Your branch is ahead of 'origin/feature/feature_release' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
但是,使用 repo
,我得到:
$ repo status
project <project1 root dir>/ branch feature/feature_release
project <project2 root dir>/ branch feature/feature_release
project <project3 root dir>/ branch feature/feature_release
这并没有告诉我,例如,project2
有需要推送的本地更改。如果我尝试 forall
我得到这个:
$ repo forall -c "git status -sb"
...
## feature/feature_release...origin/feature/feature_release [ahead 1]
## HEAD (no branch)
## feature/feature_release...origin/feature/feature_release
## feature/feature_release...origin/feature/feature_release [ahead 1]
## feature/feature_release...origin/feature/feature_release [ahead 1]
## feature/feature_release...origin/feature/feature_release
## HEAD (no branch)
## HEAD (no branch)
...
repo
是否有一种内置的方法来做一些事情,比如在项目名称前加上:
## <project1 root dir>/ feature/feature_release...origin/feature/feature_release [ahead 1]
## <project2 root dir>/ HEAD (no branch)
## <project3 root dir>/ feature/feature_release...origin/feature/feature_release
## <project4 root dir>/ feature/feature_release...origin/feature/feature_release [ahead 1]
我想从 repo start
开始会有所帮助,但我从来没有让它发挥作用。
我 RTFM 更进一步,-p
标志似乎是我要找的大部分内容:
$ repo forall -pc "git status -sb"
...
project <project1 root dir>/
## feature/feature_release...origin/feature/feature_release [ahead 1]
project <project2 root dir>/
## HEAD (no branch)
project <project3 root dir>/
...