|
We do all the branching / dev / commit / merge to integration just fine with SVN. I simply fail to see the superiority of git in this regards. But read my comment to the entire thread.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
Okay, based on Jeremy's and other comments, I think I may be close to understanding what GIT does better than SVN or any other centralized server system...
When a developer wants to do work, they pull a working copy. It's local to their machine. All of their work - commits and what not occur to the local copy. The changes do NOT go back to the repo until they push. When they push, the code changes, the history, etc go with the push.
Do I have this correct? Going to go read some GIT doc.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
modified 13-Feb-24 10:08am.
|
|
|
|
|
charlieg wrote: Do I have this correct? Going to go read some GIT doc. You are 100% correct.
Jeremy Falcon
|
|
|
|
|
charlieg wrote: The changes do NOT go back to the repo until they push. Oh, I'd also add to that, that in git-land, to help untrusted code not make its way into the mainline and since merges happen like crazy (a good thing), a pull request is a common thing. So, if someone pushes a change to a remote repo, you could set it up to require a code review. You can technically do this in SVN-land, it's just more of a pain to pull off.
Jeremy Falcon
modified 13-Feb-24 12:28pm.
|
|
|
|
|
Sounds like how I work.
I tool away for a couple of days; if I was on the right track, I compile, zip and save that version to a remote drive with a dated file name. Or start over.
Repeat evey few days.
No branches, twigs, leafs, buds, flowers, weeds.
Sort of like how we did backups in the "old days". Except there are no carts with card trays or portable disk packs.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I guess. Except we're all driving around in Teslas and you're Fred Flintstone in your feet powered car
|
|
|
|
|
For one man teams that are diligent, it can work. When you get to more than one, it rapidly gets out of control.
I still remember the day when I was cleaning up the project folder... and I purged all the versions. I had no idea. He almost had an aneurism... took a few deep breaths and explained to me why he had a twitch in his eye It's not like I was on a mission, I was trying to help free up some disk space we needed...
So, there I was with this "I just took a bite out of a ****-sandwich" on my face. Took a deep breath and said, "let me pull the backup tapes..." Thankfully they were from the day before and good. This was the day I had a career epiphany - delete nothing. Move it, archive it, but delete be bad.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
I am not a big fan of Git but that's what we use. I guess the good news is GitHub is not the sole provider of the service - there are others such as BitBucket which what we use and it integrates with VisualStudio reasonably well.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
See that's the other thing. I would NEVER have company code out on GitHub. Source code is the Crown Jewels and the jewels stay on the premises. I do know you can set up your own server locally, or I think I read about that.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
GitHub does allow for private repos btw. If that's the concern. I mean, the code is still on their servers though, but at least it can be marked as private if desired.
Jeremy Falcon
|
|
|
|
|
Github is not just public repositories, it makes most of its money by hosting private repositories.
You can use other services like Azure or Bitbucket.
Or even self host.
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
sorry. Microsoft bought GitHub in 2018. Microsoft is the "most public" fluster cluck of security that I can even imagine, not that they are alone. I'd not trust HP nor Amazon with the Crown Jewels.
I want that one person or small group in my company understanding they are not going to lose a contract, they are going to be summarily terminated for not doing their job.
It's down toward the bottom of the list to research - offsite GitHub repositories, but every fiber of my being says no. If I could put a private GitHub repo behind my firewall and on my network - fine. Companies hosting this out in "the cloud" are out of their elephanting mind.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
charlieg wrote: I do know you can set up your own server locally
You certainly can - I have a Git server on my Synology NAS as a local backup, and I've had a locally installed instance of Gitea in the past.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
charlieg wrote: Exactly what am I missing? I simply do not see anything significant git brings to the table that svn does not
The origination of GIT was specifically aimed at online open source projects.
Git - A Short History of Git[^]
The only significant problem I have encountered with git is that it does not work well with Enterprise development.
In an ideal Enterprise world one would have the following
- Strict boundary breakdowns
- Teams working on libraries
- Applications using libraries by version
For git the above works well because a library is then just a repo. And a deliverable.
However that ideal is not what happens. Even modestly sized business multiple applications (product or service is still an application) are a norm. With SVN that works as follows.
- library code goes into its own folder tree
- Apps each go into their own folder
- An app folder and associated folders is labeled for a build.
The means that the library code moves forward but it is labeled independently for each app.
It is NOT possible to do the above with GIT. There is one label for the entire repo.
So one often ends up with a mix of idioms. Perhaps one library in its own repo. But other libraries might be copied. Or two or more apps end up in the same repo.
And a repo explosion without tracking can also occur. Where one offs end up in their own repo.
With SVN it would just go in a new folder. Of course people will complain that that last case is a problem. So it is. But creating new GIT repos every single time without any coherent tracking is also a problem. (I have seen developers create repos just to experiment and then the repo gets abandoned.)
---------------------------------------------------------
As for losing source control due to problems with a specific source control solution ...
Long ago losing databases was also a problem. Forums would always have someone asking how to restore corrupted databases. That was true for every database vendor. I haven't seen anything like that for years. But also true that now people always back up their databases.
Source control is NOT a back up. But many places treat it has such. Even now.
|
|
|
|
|
I am hoping the use of sub modules will solve this.
One repo for the Solution, it just tracks all of the other required repos (libraries) at the needed release levels.
|
|
|
|
|
"source control is not a backup"
true words. But I have it on IT's assurance that they are imaging the VM server hosting our code. Years ago, I submitted an IT ticket to verify our backups. This created a tornado of panic. What do you mean the backup is bad? No, I asked you how do you know it's good.
As for your other comments about libraries and common code bases, well I gave up on that 10 years ago. ctrl-c/ctrl-v is our inheritance process I'll admit that we're a very embedded product oriented shop, but I'd still like to see common code isolated to one area. Like I do, but I lost that battle long ago.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
charlieg wrote: Like I do, but I lost that battle long ago.
Did you mention due diligence and legal costs associated with copyright violations?
I like to point that out when someone complains because I insist the find the license. That due diligence comment really makes C level execs perk up.
|
|
|
|
|
" copyright violations?"
Please elaborate, I'm not following you. All of our code belongs to us.
As for your description of enterprise level development, holy cow, I've not done anything like that in 20+ years. Thinking back to when I did gave me a headache
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
charlieg wrote: All of our code belongs to us.
So your company does not use 3rd party libraries of any kind?
Only time I have heard of that is significantly intense DOD work.
|
|
|
|
|
Okay, I follow you now. They tend to hide behind other vendors if they are spending $$. But the developers tend to play around, and licensing of this sort is so far off the radar...
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
Agree 100% on the license. Especially with the older licenses. Include and enhance the wrong “open source” component and you might have to disclose your whole product.
Also the free for development but pay for production licenses can bite you.
|
|
|
|
|
Yes I have seen both of those also.
|
|
|
|
|
I was using SVN briefly when I was on first job after university so I might not remember it correctly but I remember frustrations it was giving me and I hated it with every piece of my body. Using GIT was a breeze and I instantly got the mental model, so I might be biased for using it for last 14 years and remembering SVN workflow as workflow from hell. So I have a lot to write on the topic - because I feel that GIT is just so much better and it makes me much better developer and development so much easier.
Let's start with not needing connection to the server to be able to create commits. When internet is down I still can create commits move them around and publish to server when I want not when SVN wants. Also if I have it locally it is much faster to commit anything than over the network. (almost no one uses fully distributed workflow so yeah)
Branching is something you just do in GIT and you don't have to ask anyone because branches don't live on the server. I can do 10 commits then go back to starting point and make new branch in matter of minutes and have different approach developed, I can delete local branch that I don't like and publish stuff I do like. No one will ever see it.
Conflicts, I can fetch changes from remote repository and have my local branch separate, I can keep on working on my stuff until I want to merge things while also having possibility to easily switch to. With SVN I am forced to deal with stuff even when I am half way done but I also want to check what is there so I could prepare for it.
In general mental model for having undo outside code editor that I can view and cherry pick, staging chunks of files to move parts of my development outside of IDE - because some things can be added by IDE and I can control what I publish in perfect way gives me ease of mind. Where SVN tooling was rudimentary at best, maybe it changed as I not used it.
|
|
|
|
|
"Let's start with not needing connection to the server to be able to create commits"
This is the key difference that is NOT well explained when comparing GIT to SVN. The fact that you can have all of the source control actions local including comments and what not falls under what I would call a "useful feature."
In my shop, any developer can create branches and tags and have done so for years. So, when people say "branching is a breeze in GIT as compared to SVN" no brilliant flash of the obvious came to mind. The only thing that MUST be done as an admin is to create a new repo.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
Yeah that is for me "distributed" part that is basically killer feature.
Unfortunately people throw "distributed" around like everyone should be mailing patches to Linus himself and other contributors just like it is some holy grail - but no one uses it like that so everyone only gets more confused.
|
|
|
|