Closed abhijit86k closed 7 years ago
We have hardcoded to origin
as the remote to compare to as that's the git
convention.
https://github.com/twolfson/sexy-bash-prompt/blob/0.26.7/.bash_prompt#L166-L167
What are your remotes named?
If neither of them is named origin
but you have branch tracking set up, there's probably a way to resolve remote based on the branch itself.
My remotes were called "server1_name" "server2_name" and "usb". I tried renaming the server1 remote to origin using git remote rename, but that didn't seem to change anything. I'll try to look into it over the weekend.
Ah, weird. As a heads up GitHub is hiding the <server1>
/<server2>
due to thinking they were HTML tags =/
Updated the comment. I was wondering what happened :)
"git remote rename" does work. In any case, there can be cases where there are multiple remotes and the default tracking branches differ. I've added the check and created a pull request. You can merge it and close this thread.
Forgot to close this. This has been resolved via #69 and #70 and released in 0.27.0
On one of my repos I have set up two remotes (redundancy). Even after pushing to both remotes, the prompt indicates 'unpushed' status. I haven't had time to look into this yet with a clean test case, so it may just be some quirk on my repo.