C
C#•9mo ago
Cryy

Moving to GIT

Hey guys, we are about to move from TVS to GIT so I' doing some experiments and also trying to understand how it works and I have an issue. I selected "Limit merge types" option in Azure to make pull requests required if I want to push something to the main branch. Now I'm about to create pull req, but "Create" btn is disabled no matter what I'm doing and I'm not able to get more specific message about what's wrong. Any idea how to solve that ? Thank you
No description
No description
37 Replies
Omnissiah
Omnissiah•9mo ago
(what's tvs?)
Cryy
CryyOP•9mo ago
*TFS, sorry 🙂
SparkyCracked
SparkyCracked•9mo ago
Did you manage?
Cryy
CryyOP•9mo ago
Yeah I'm a bit stupid. Issue is ... if I understand it correctly if I want to create pull req I have to be in another/feature branch 🙂
SparkyCracked
SparkyCracked•9mo ago
yes haha. You need to be on a different branch, but you not stupid...just learning also you must make sure there are changes to merge otherwise no point in pr
Cryy
CryyOP•9mo ago
That's confused me cause I saw no changes in my pull request but there were definitely some commited waiting to be pushed so ... git's not so straightforward 🙂
SparkyCracked
SparkyCracked•9mo ago
Yeah, I have created a document for git for work I suggest doing something similar, if I send you it, it will be very overwhelming as it has everything
SparkyCracked
SparkyCracked•9mo ago
Maybe have the basics first and build on that. To start you off here is something small:
SparkyCracked
SparkyCracked•9mo ago
It is more bashed focused and may not include GUI interface instructions, feel free to use it as guidance or just ignore it. If you need help with something specific just ping me or something <3 @Cryy
Cryy
CryyOP•9mo ago
Ah great, thanks, really appreciate your help 🙂
SparkyCracked
SparkyCracked•9mo ago
No stress. I sent the pdf version so it is easier to read Hope it helps!
Cryy
CryyOP•9mo ago
Definitely. I went through it and it's pretty easy to understand 🙂
Jimmacle
Jimmacle•9mo ago
if you don't push your local commits then they won't be on your remote repo to create a pull request for syncing between local and remote isn't automatic
Cryy
CryyOP•9mo ago
@jIMMACLE @SparkyCracked Yeah, I figure that out too, thanks guys 🙂 One more question. In TFS we used reviews for some commits/check-ins and I think pull request has similar purpose. But if there are some changes I want author to fix or I'm not even able to build the changes (I set up some branch policies) how can I (as reviewer) to force author to fix that ? What is the standard flow for that in Azure ?
SparkyCracked
SparkyCracked•9mo ago
Sorry to respond so late, only on now (10am for me haha) So how my company does it, is we have our manager as a required reviewer...on Azure it won't let you merge changes unless that Required Reviewer has accepted. So you just don't accept until it's done. Commenting on a PR will also prevent you from completing the merge until that comment is solved. If you want to do the changes yourself you can. But wouldn't recommend working on their branch. So rather just comment and ensure you are a required reviewer. Hopefully that helps
Cryy
CryyOP•9mo ago
Thank you 🙂 And one more q ... Is it possible to manage pull requests from VS 2022 ? From what I found that possibility is missing in VS 2022 and plugins are supported only in VS 2019.
SparkyCracked
SparkyCracked•9mo ago
We personally use Azure's website for that. I'm sure there is a way but I am not fimiliar with it sorry
Cryy
CryyOP•9mo ago
It's ok but it really looks like there is no way in VS 2022. But maybe I'll try do more research 🙂
SparkyCracked
SparkyCracked•9mo ago
Cool. Lemme know if you find anything, would love to implememnt it as well on my side
Cryy
CryyOP•9mo ago
@SparkyCracked well it looks like there is really no way to work with PR in VS 2022 (except for creating one). There are some plugins for VS2019 but it seems they does not work with DevOps :/ @SparkyCracked Is that weird that I dont understand the graph/branch that git use to display hisotry ? It seems really messy to me and also it looks a bit different in VS and for example in Source Tree
Omnissiah
Omnissiah•9mo ago
one of the feature that many visual git clients try to implement is showing the branch tree in an understandable way
SparkyCracked
SparkyCracked•9mo ago
No not wierd at all, I find it so messy as well don't stress. I think if your tree and branch management is good, it will look good
SparkyCracked
SparkyCracked•9mo ago
This was our branch at work before:
No description
SparkyCracked
SparkyCracked•9mo ago
I went and fixed it to look like this:
No description
SparkyCracked
SparkyCracked•9mo ago
If your 'developers' are not fimiliar with good git practices and how to actually work on branches, it looks like the first branch Azure is a special one haha
Cryy
CryyOP•9mo ago
Well mine looks like this :/
No description
Omnissiah
Omnissiah•9mo ago
the far far red branch on the right is weird
Cryy
CryyOP•9mo ago
but in sourcetree tree it make more sen se but I dont understand the color cause green one for exxample is used for more than one branches:
No description
Cryy
CryyOP•9mo ago
yeah it is 😄 sorry,
SparkyCracked
SparkyCracked•9mo ago
Lmao How are you making your branches? branching from main?
Cryy
CryyOP•9mo ago
Currently in VS main -> new local branch from yeha
SparkyCracked
SparkyCracked•9mo ago
Ok try not to do that. Have a developments branch. Or dev branch From there, create branches based on that
Cryy
CryyOP•9mo ago
Well I'm currently reading something about Git Flow and how it implement in DevOps. Is that what I suppose to use ?
SparkyCracked
SparkyCracked•9mo ago
Any issues or features, are based off that dev branch, from there always rebase before creating a PR
Cryy
CryyOP•9mo ago
Ah, ok ... thanks, I'll try 🙂
SparkyCracked
SparkyCracked•9mo ago
Cool, if you need a diagram lemme know
Want results from more Discord servers?
Add your server