RStudio show git branch and state


Is it possible to have the display of the current working directory also show the git branch (and it's state). For example, let's say my current working directory is /home/ben/package/foo and it is also a git repos. I have configured my linux shell to indicate, when I am in that directory, which branch is exposed and it's state. So...

ben@myserver /home/ben/package/foo [dev*]$

... tells me that the 'dev' branch is exposed and that it has changes to attend to.

Is there a way to get the path display at the top of the Console and/or Files windows in RStudio IDE to display something similar?


Hi @btupper,

The Git pane in RStudio does show the current branch.

Not exactly what you are looking for, but perhaps helpful.

I don't think this is yet possible with RStudio IDE.
However, I think you could be interested to add a :+1: in this feature request for RStudio

I don't use them myself, and they are not on CRAN yet, but there is two package I know to configure the prompt. You may use them to customize a R prompt for your need

They have the same name, so there would be conflict and it is one or the other.
hope it helps.

That feature request is spot on - thanks for the heads up.

While I like the idea of the prompt control, I am hesitant to use any extra real estate from the console. Nonetheless, I'll give it a shake.


1 Like