/ code

Git remotes

There remains something new to be learnt every day and this one is one good such. One of the most often encountered troubles these days is figuring the remote branch for PR.

Yes, emails/web UIs could be a direct choice to figure the changesets/the merge flows. But working with trivial changes that don't need manual review makes it a strong no case for web UIs.

Finally, figured a way out today using git's inbuilt remote branch listing command. Topped it up with some nifty sort and awk, I could wrap a way out to find the last changed remote branch.

As it stands now, the branch comes up as / for direct merge (as I want).

Planning to build on top of this small script to automate CI flows and reviews.