the jack of all tradesThe Shinsengumi and the Yorozuya are constantly bickering: whether that's fighting over a hanami viewing spot or battling it out over character rankings, the two groups seem to be at odds with one another endlessly (and more often than not the odds seem to be rather trivial). On the other hand, they're often times fighting for the same cause, or members of the Shinsengumi will go to the odd jobs for help. Hijikata is certainly no stranger to this: at his ultimate moment of desperation, a cursed sword that turns him into an anime otaku, he calls upon the Yorozuya to help him get through it and save the Shinsengumi. As someone who has an extreme amount of pride, it took an extremely serious situation for Hijikata to turn to them for help, but in doing so it does seem to show that he has a certain amount of faith in Gintoki and his two companions.
Sakata GintokiHijikata and Gintoki are constantly running into one another, and they like to make a competition out of just about anything: as serious as a clash of swords and as banal as sitting in the sauna. In fact, there's an entire episode dedicated to the fact that running into one another seems inescapable for the both of them: even in trying to avoid eachother, they end up in the same places. It's safe to say that the two see each other as rivals (or maybe "frenemies" is a more precise word). What's ironic about this pair of samurai however, is the fact that even in the most ridiculous situations (such as being handcuffed to one another) they're able to cooperate when danger calls, even if it is reluctantly. And though they both definitely claim to "not get along", it's pretty clear that underneath they don't hate each other's guts as much as they put out to-- Gintoki has actually come to Hijikata's rescue during one of his most desperate times of need.
Such a rivalry has of course spurred some suspicions among fangirls which Gintama itself outwardly recognizes: during an episode of Gintama, Gintoki openly holds a homoerotic Gintoki x Hijikata DVD in reference to the fans. However, as usual, these are merely fan-based critiques on characters who inadvertedly look at each other too longingly or what have you, so all we can draw from it is Okita's suggestion that the two really do get along, and are just too stubborn to admit it. (The episodes of them tangoing, seeing movies and riding Gin's scooter together probably suggest otherwise, but that's another story entirely.)
Shimura ShinpachiShinpachi seems to have some sort of inevitable connection to the Shinsengumi due to the fact that Kondou has the hots for his sister Otae. As the "straight man" of the series Shinpachi shows no disrespect: he's always the first of the Yorozuya to admit that Hijikata is not as bad of a person as he puts out to be. The two of them have interacted a number of times: an example being Hijikata writing a romantic follow-up letter for Shinpachi when he can't seem to figure out how to reply to his female penpal. Perhaps another time worth mentioning is when Hijikata's otaku-side, Tosshi, comes back to life and he makes an attempt to squash this side of himself for good by competing with fellow Shinsengumi members against Shinpachi (and thousands of other eager otaku) to become Otsuu's official fanclub.
Much to his dismay, Hijikata ends up indebted to Shinpachi, who sacrifices something he dedicates his life to in order to help Hijikata bury Tosshi for good. In the end it ended up being beneficial for the both of them: Hijikata was able to finally consider himself "free" from the idea that Tosshi may take over his body and return again, and in turn, Shinpachi was able to realize the fact that there was nothing official or unofficial about cheering on his favorite idol. Shinpachi and his friends give up the title of official fan club and leave Hijikata a member card (with Tosshi's picture on it) as the first member of Terekado Tsuu's official fan club.