Git Status Utility Script

When working as a team on a shared codebase, it is important to ensure you are developing with the proper changes in order to avoid costly merge conflicts. In order to eliminate my team’s reliance on constant commit checks, I developed this small utility script that could be added to the build process. This script will notify the user if their current branch is missing commits from the origin. This would occur when another team member commits code that you have not yet pulled. Adding this to our build chain greatly decreased merge conflict resolution nightmares, and so I share it here for your benefit as well:


                
            

Example Output


Current local branch Dillon_Dev is behind remote LatestStableDev by 1 commit(s)
It is recommended to pull latest changes
3 2 1

This file is a standalone script, and is therefore meant to be called from within your build/toolchain script directly. Usually before the build process begins. You can always choose to pull out the functionality and integrate it directly however.

Previous
Previous

Connecting WSL to Network: Automatically

Next
Next

StoryboardIO: Quickstart Guide