It might be useful to present an introduction and basic user guide to GIT repository …..
It might be useful to present an introduction and basic user guide to GIT repository …..
We use a single repository for a project.
No one can commit/push to the master or development branch.
Developers clone from master or project, depending if it is prod support work or project development.
then create a future branch and commit and push to that very often.
When developers are ready with the work, they create a pull request (we use azure devops for that).
Code is reviewed by someone from QA team, then approved for merge by master or project branch owner.
Both these activities are done in azure devops' pull request flow. Managed by notifications.
A developer can also be a reviewer or branch owner, but can't review or approve their own pull requests.
When the pull request is approved, the feature branch is deleted, because its complete and no longer needed.
Commits and pull requests stay in the system forever.
As a daily activity, I synchronise all approved master pull requests with the development branch and inform the developers of the changed sources.
We do almost as you explain, except the review.
That doesn't happen before the pull request, but as part of the pull request approval.
If the review passes, the reviewer approves the pull request.
If not, they use the code comment functionality in devops and reject.
The developer can then fix code in the existing feature branch. Those commits get automatically added to the pull request when pushed.
The approval count is reset and the review can proceed...
I've been in environments where Crucible was used for code review before the pull request to keep the pull request clean.
Also, at Intel, the code went through an analyzer and linter when pushed to a branch and would get rejected if there was a failure and everyone assigned to the project got an email of said incident.
But, then again, there are folks that still use SVN over Git.
Great link, thanks - but:
I downloaded the two free books on VHDL and Verilog, these were free so I'm not complaining but should issue a warning.
They re fine if you can't afford anything better but are really the same, very old fashioned, book written with a very hardware logic orientated view and formatted up for two different HDLs.
I only did a quick scan but, for example, the Verilog book, although published in 2019 makes no proper mention of the different versions of Verilog or of the existence of System Verilog.
The book does not, as far as I could see, even state which version iot was written to support.
The VHDL book seems to share the same rather generic first section and uses the same examples throughout - this isn't necessarily a bad thing - it makes it easy to compare the two HDLs.
(except it doesn't use recent features of either).
The examples are simplistic, the discussion of state machines sticks rigidly to the 3 process model (I haven't written a 3 process FSM in the last 19 years !!) and doesn not even mention the existence of anything else.
These books will get you started but only on very simple stuff.
Like the man said, "There's no such thing as a free lunch".
These books could count as a free biscuit !
But thanks again for the link - I've download some about some stuff I know nothing about - which I would never have been able to affords to buy.
MK
.
inspired by the discussion, I'm turning the firmware repo for my dc load into a managed project, with branch policies.
I've been the only committer for this project and for these situations I just create a master branch with commit rights (all my github repos are currently set up like this).
But I can create a project with board for issue and pull request management, and fiddle out how branch policies work in git.
Then switch my local repo over to a development branch ...
Here's the locaton: https://github.com/jancumps/msp432/projects/1
Jon,
Branch strategy is an entirely separate topic. Branching depends on the development environment and the branch strategy.
I am sorry but this is totally wrong. Not just IMHO, it is wrong as you read the basis of the Git features and behavior. What is TOTALLY another topic is Agile as well as the tons of other team development methodology. All of them – it is the current trend – tend to abandon SVN and other source control methods moving to Git.
A COLLATERAL but not totally different topic instead is the Git platforms you mention: GitHub (I use for open source) GitLab (I own my license on my AWS server as well as another GitLab for company Git development) and many other; for example, Qt development has its own report. Those you mention are just the most popular, GitHub on top of them.
developers should not push remotely their local Git database it is just an option when they work on teams, need to share with company or colleagues their development, and so on. As I told these are just tools and options where you can store Git on the cloud. I have tons of my Android development repositories I stored privately on my own AWS server as my local and remote collaborators were accessing the same, using online git commands and SSH for remote connection.
Enrico
I was going to post to say that using Git as a source control tools and using branching for managing work in a team are very different things, but I can see that everyone's already jumped in on this one. No surprise, that people have different firmly held beliefs too. Best we stay away from subtleties like whether to squash merge commits!
A lot of it does depend on how you team works, so I don't think there is a definitive right or wrong with branching strategy. No direct commits to master is probably a fairly consistent approach, although as I have found myself on a one-man team at the moment I find I sometimes bend (OK - blatantly break) this rule.
One thing I'm really appreciating in my current job is that I got a chance to set Continuous Delivery up right from the start. If code in master passes unit tests, it's automatically deployed to AWS.
Jon is right that branch strategy is important when working with production vs project code, with several parties working on both.
If one starts such an exercise without a strategy, it just gets out of hand.
You will have version control, but a complex release process with the risk of having to resolve merge conflicts (or overwrite fixes done in the production code -> regression) at the very end when you go live.
Doing this pure in GIT, without support of one of the platforms to manage the pull request cycles, is a rough ride.
It's hard enough with the support of those platforms.
I have experience with branch policies and pull request approaches in Azure DevOps and GitHub. Learning GitLab ...
The only difference is that I have the habit to never delete branches, also the dead ones. But as you say, this is an approach – very good in my opinion – that is based on a strategy. We adopt almost the same but it is the approach topic. Then branching, pull, joining, requests for merging, forking, and all the other possibilities and features, as the expression of the full potential of Git. I suppose you agree with this.
Years ago, were times when Nokia still was a top company, Symbian and Maemo was the top for mobile OS, Wt was version 3 or 2.xxx and in the group of Nokia developers, I was participating to some stuff in the dev team of what it was expected to be a very advanced, powerful and revolutionary SBC. In the meantime, as a Qt-ambassador, I participated mostly as a tester as a member of the opensource group (many people from Trolltech, some very respectable super-skilled guys from the Qt community, and other very experts Qt developers) in the creation of the porting of Qt under Android. It was the period between 2010 and 2013 and in both the cases I faced with this kind of Git approach; IMHO was the only possible way to keep under control big developer teams working on many different groups of features part of the same project like an operating system is. It was in those years I learned Git used in this extensive way and as much as I learned, as much I appreciated it.
BTW, that powerful and revolutionary SBC become a worldwide success
Thanks for the review and heads-up.
Could you clarify which books you were looking at, as I found four titles:
by the same author and I suspect there will be a lot of duplicated content between them. Not sure if you were referring to all four or just two. (Actually I found six titles but two were the earlier 2017 editions of the same title.)
From what I've seen it is common for authors to re-write the same content but present one book in Verilog and one in VHDL. Not very helpful if you are starting out and you are unsure of whether to take the Verilog or VHDL routes. Some authors will do it within the same book with the same examples in both Verilog and VHDL which can be helpful to illustrate the differences but the book then tends to be twice the price.
I'm not surprised of the hardware logic oriented view as I suspect that a lot of readers trying to get started with FPGA design are coming from a hardware logic oriented education. (Have they started to include programmable logic devices as part of the digital electronics syllabus yet ?). However I have found this as being a bit of an issue now as the FPGA design tools appear to have started to drop the logic schematic based design tools in favour of coding straight in HDL.
I notice however that you don't suggest any alternative texts which would be a better option for starting out on.
The best I've found so far as an entry level text is:
Digital System Design with FPGA: Implementation Using Verilog and VHDL
but it is not a cheap option, and it expects you to have access to a copy of:
Programmable Microcontrollers: Applications on the MSP432 LaunchPad
https://www.mheducation.com/highered/product/1259836193.html?exactIsbn=true
(which is equally not cheap) in order to accelerate some of the microcontroller based project designs covered there using the new-found FPGA skills.
The book also expects you to have access to not one but two different FPGA trainer boards, so quickly gets expensive to follow along, or you have to adjust the examples to work with what boards you have (not necessarily bad as it helps reinforce the learning.)
I've also found:
The Design Warrior's Guide to FPGAs
https://www.elsevier.com/books/the-design-warriors-guide-to-fpgas/maxfield/978-0-7506-7604-5
useful for some of the history of design leading up to FPGA but this is an old text and stops at around 2004.
As above, books are often tied to specific trainer boards (which can often be expensive). Some revised editions of books are still referring to trainer boards that are now no longer even available to purchase. The author appears to have just updated the text to account for recent software updates and re-published.