Closed najamelan closed 8 years ago
this feature you are requesting is essentially the original primitive behavior from 5 years ago - you could reset this repo to the original commit and you would have essentially that - this was never intended for scripting - the main use case for this script is the human-readable report
if that is all the output you wanted for a single branch you could get that like this
remote="origin"
branch="master"
ahead=$(git rev-list $branch..$remote/$branch --count)
behind=$(git rev-list $remote/$branch..$branch --count)
echo "$remote/$branch $ahead $behind"
you could also use git --dry-run
for your specific purpose
Ok,
thank you for the tips, I'll most likely do it like that then. Ill still keep git-branch-status for my own pleasure when using the command line ;)
This tool is really nice for scripting, but parsing the report is a bit of a pain. It would be nice to be able to ask the situation for a branch and get a oneline output, maybe like:
origin 1 -2
Or even if the remote can be specified, just:1 -2
Personally I'm looking for the simplest way to tell if a remote branch can be pulled --ff-only without actually doing the pull...