Git branch changed event?


#1

Is there an event I can listen for that is raised when the current Git branch is changed? I’ve scoured the API documentation and searched the forum but couldn’t find anything related to it.

Thanks!


#2

Check out this function (and its related functions):

There doesn’t seem to be a specific event for branch changes, but as long as you track the current branch, you should easily be able to determine if the branch has changed when you handle the status-changed and statuses-changed events.