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
37 Replies
(what's tvs?)
*TFS, sorry 🙂
Did you manage?
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 🙂
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
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 🙂
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
Maybe have the basics first and build on that. To start you off here is something small:
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
Ah great, thanks, really appreciate your help 🙂
No stress. I sent the pdf version so it is easier to read
Hope it helps!
Definitely. I went through it and it's pretty easy to understand 🙂
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
@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 ?
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
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.
We personally use Azure's website for that. I'm sure there is a way but I am not fimiliar with it sorry
It's ok but it really looks like there is no way in VS 2022. But maybe I'll try do more research 🙂
Cool. Lemme know if you find anything, would love to implememnt it as well on my side
@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
one of the feature that many visual git clients try to implement is showing the branch tree in an understandable way
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
This was our branch at work before:
I went and fixed it to look like this:
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
Well mine looks like this :/
the far far red branch on the right is weird
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:
yeah it is 😄 sorry,
Lmao
How are you making your branches?
branching from main?
Currently in VS main -> new local branch from
yeha
Ok try not to do that. Have a developments branch. Or dev branch
From there, create branches based on that
Well I'm currently reading something about Git Flow and how it implement in DevOps. Is that what I suppose to use ?
Any issues or features, are based off that
dev branch
, from there always rebase before creating a PRAh, ok ... thanks, I'll try 🙂
Cool, if you need a diagram lemme know