Skip to content

Instantly share code, notes, and snippets.

@dxc04
Last active June 3, 2020 08:17
Show Gist options
  • Save dxc04/1e9cfcf11cefde1a3ffaca44ebdf674f to your computer and use it in GitHub Desktop.
Save dxc04/1e9cfcf11cefde1a3ffaca44ebdf674f to your computer and use it in GitHub Desktop.
git: checks if branch is updated or behind from a remote branch
git rev-list --left-only origin/master...feature_branch
# You can add/use flag
# --right-only is for "ahead" information
# --left-only is for "behind" information
# --count to count the number of commits behind or ahead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment