Тёмный

Git Version Control _final_new_final.new - Computerphile 

Computerphile
Подписаться 2,4 млн
Просмотров 60 тыс.
50% 1

Continuing our look at Git, Dr Max Wilson has a quick look at versions and branches.
/ computerphile
/ computer_phile
This video was filmed and edited by Sean Riley.
Computer Science at the University of Nottingham: bit.ly/nottscomputer
Computerphile is a sister project to Brady Haran's Numberphile. More at www.bradyharan.com

Опубликовано:

 

24 фев 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 119   
@veggiet2009
@veggiet2009 2 года назад
Everyone knows "Final2" is the ultimate edition of any piece of code
@saiskandapgs
@saiskandapgs 2 года назад
Yes but it's second only to Final_Final_4
@h3xad3cimaldev61
@h3xad3cimaldev61 2 года назад
Yes but it's triumphed by the "We're shutting down" update which disables all functionality of the application
@Abrifq
@Abrifq 2 года назад
Amateurs, I use Final²
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 года назад
Anybody who was around in the 1980s might remember Judge Greene’s “Modified Final Judgement” on the breakup of AT&T, the old US phone-company monopoly. Just to say, if lawyers and judges can do it, why shouldn’t software developers do it too?
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 года назад
Anybody who was around in the 1980s might remember Judge Greene’s “Modified Final Judgement”
@jasonlavalleur
@jasonlavalleur 2 года назад
I like how the title looks like an error until the video starts and explains itself immediately.
@Balloon410
@Balloon410 2 года назад
Yeah it fooled me at first.
@klekaelly
@klekaelly 2 года назад
Git is pretty easy, whenever it doesn't work I just do "git push --force" and the error goes away.
@tyu3456
@tyu3456 2 года назад
Lol. Hope everyone knows this is satire. Please don't do this if you work on a team. Or even if it's just you, you might delete your own code 😥
@centerfield6339
@centerfield6339 2 года назад
@@tyu3456 it's never really gone in Git.
@sstundzia
@sstundzia 2 года назад
@@centerfield6339 Besides the fact that it is quite tedious to dig through `git reflog` to find lost commits, most hosting platforms like Github or Bitbucket run `git gc` on a scheduled interval to discard any orphaned commits to save storage space. This means that likely the only copy of the commit you lost with `git push --force` will only exist on your local machine. So be careful with `git push --force` as it is quite a potentially destructive operation.
@librariesarecool7461
@librariesarecool7461 2 года назад
I started taking programming for fun last semester. Most of the content on this channel still goes over my head, but it's still really rewarding to see a computerphile video and realize it's stuff I know!
@StefanoBorini
@StefanoBorini 2 года назад
Oh, thanks a lot for the PTSD trigger of my professor filenames during my PhD...
@cindrmon
@cindrmon 2 года назад
only in this video i now understand the purpose of git tagging. thanks computerphile! i've been loving git ever since i first used it for my coding projects! it is now one of the quintissential things you need to know when starting to code that's not related to coding in general.
@yeungfelix01
@yeungfelix01 2 года назад
2:21 That notch cracks me up lol
@kye.warrer
@kye.warrer 2 года назад
I feel like this is leading into a video about CI/CD pipelines!
@IceMetalPunk
@IceMetalPunk 2 года назад
*Trauma flashbacks*
@IceMetalPunk
@IceMetalPunk 2 года назад
Naming conventions are hard. On the subject of version numbering, I have a story about it. About a year ago, I was put in charge of moving our project from our own CI/CD pipeline (continuous integration/continuous deployment, i.e. "as soon as code is merged, it's automatically built and uploaded to our testing servers by this system") to a new "one size fits all" pipeline our company decided to build. The goal was that every project in the company would be using the same pipeline in the end. Well, turns out we were using a slightly different version numbering scheme than everyone else: they all used .. while we used ..-, since we often go back to older patch versions our clients refuse to update away from and make changes there in new builds. No big deal, right? It's just one extra number and a hyphen, right? Wrong. The global pipeline was not built to deal with that format, so it kept parsing our version numbers wrong and trying to upload the builds with the wrong name. This led to collisions, where the filename it was trying to upload to our servers already existed, so they'd get rejected and not upload at all. It was a month of headaches before I finally had to just tell the team writing the new pipeline to give us an optional settings flag to switch the expected version format. A month during which they kept saying, "why don't you just switch how you number things?" and we kept saying, "because then our clients can't ask us for changes without updating, and unless you want them complaining to YOU every hour, we can't do that!"
@proosee
@proosee 2 года назад
Can't speak for technical details, but one thing I've got from this story is that you have terrible relationships with your clients...
@IceMetalPunk
@IceMetalPunk 2 года назад
@@proosee Not sure where you got that from.
@proosee
@proosee 2 года назад
@@IceMetalPunk from the last part about when your clients know better how to label your versions of the software.
@IceMetalPunk
@IceMetalPunk 2 года назад
@@proosee No, I think you misunderstood. The clients don't have anything to do with how we label our versions; it's just that our clients get to choose whether they update to a new patch or not, but they also get to request changes on whatever current version they're on, which creates "sub-patch" versions.
@proosee
@proosee 2 года назад
@@IceMetalPunk that's the other part: why do you keep it reversed? You should implement features on main version and just patch bugs on supported older versions in case some one is still using it - that limits number of versions you need to support. If you want to charge specific clients for those features just make the possibility to disable them via some kind of config. Of course, you do what you want to do, but for me you are supporting multiple different main versions with different features instead of one with just few latest where you can even omit some fixes for them if those bugfixes are not critical. If your software is highly customisable consider plugins and just sell them separately. I'm just saying: this model of work sounds like a lot of unnecessary effort to me, but I'm not gonna argue.
@poppop-oj6by
@poppop-oj6by 2 года назад
Yea naming of branches is often done in accordance with the task you are working on. The naming of tasks is done by a different system like Jira or preferably something else...
@rainmannoodles
@rainmannoodles 2 года назад
8 minutes after this video's release, Chrome has advanced by 28 sub-patch versions.
@AndersJackson
@AndersJackson 2 года назад
Great video, as usual. Works great with Emacs and Magit mode.
@UmaiKayu
@UmaiKayu 2 года назад
2:20 If only... App store patch notes are always filled with boilerplate marketing fluff instead of anything informative regarding the update.
@BoxOfSnoo
@BoxOfSnoo 2 года назад
"Bug fixes and performance improvements". I think that should automatically flag a review as having issues.
@FishFind3000
@FishFind3000 2 года назад
Yep, nonsense about space time continuum and grabbing a coffee. Ffs tell me what you fixed so I know if it’s worth updating.
@UmaiKayu
@UmaiKayu 2 года назад
@@FishFind3000 It's an absolute joy on the rare occasion when it's an open source app with proper patch notes, and you can actually diff the release tags in git.
@Peckingbird
@Peckingbird 2 года назад
I'm surprised there's not yet a Computerphile video on Semver - seems pretty relevant to this video.
@ingmagination
@ingmagination 2 года назад
I would rather see them do one about versioning schemes in general and explain what they offer. And then look at some examples, like semantics versioning
@fredgotpub871
@fredgotpub871 2 года назад
Very good to know, thanks !
@blackasthesky
@blackasthesky 2 года назад
I usually call my videos "xxx_preN" with N being a two digit number, counting up one each iteration.
@kevincozens6837
@kevincozens6837 2 года назад
I like the "commit messages" seen at 2:25. :)
@ativjoshi1049
@ativjoshi1049 2 года назад
That title hits home :-(
@Stjaernljus
@Stjaernljus 2 года назад
Nice title
@nathanhedglin931
@nathanhedglin931 2 года назад
I still see _final_02201702 too often.
@leonardusl5141
@leonardusl5141 2 года назад
For some reason I always thought these were edited with Avid Media Composer? Is that only used by Brady?
@Computerphile
@Computerphile 2 года назад
They were until about three years ago when Avid put their maintenance contract fees up to more than I was comfortable with! -Sean
@code-dredd
@code-dredd 2 года назад
@@Computerphile I use Kdenlive for casual editing. Have you tried it? If so, how did it go?
@Computerphile
@Computerphile 2 года назад
Kdenlive isn't bad, I have used it, but it didn't do exactly what I needed in fact there's a Computerphile on that :)
@centerfield6339
@centerfield6339 2 года назад
Running a script that randomly appends to some document names in SharePoint _final_2_temp_pleasekeep is surprisingly rarely even noticed.
@Veptis
@Veptis Год назад
The git approach sadly doesn't work on video, at least on exports. It might work for the projects as most of it is XML
@larrytroxler7017
@larrytroxler7017 2 года назад
What does GIT offer that svn doesn't?
@BytebroUK
@BytebroUK 2 года назад
Is there a graphical user interface for this, that (perhaps) looks a bit like TFS in Visual Studio?
@IceMetalPunk
@IceMetalPunk 2 года назад
I don't know what TFS is, but yeah, there are plenty of GUI-based apps for Git if you don't prefer command line. Technically, VSCode has one built into it by default.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 года назад
If you don’t know about TFS ... you don’t want to know.
@brandon-butler
@brandon-butler 2 года назад
I like the program called “Fork”
@georgehelyar
@georgehelyar 2 года назад
Visual Studio has all of this git support built in, or there's gitk or sourcetree or tortoise etc, but honestly, without wanting to sound like an elitist, you're better off using the command line than any GUI. There are only a few commands to remember and you can add aliases to make your life easier like aliasing graph='log --graph --oneline --decorate'
@TesterAnimal1
@TesterAnimal1 2 года назад
Smartgit from Syntevo. It removes all the command line horror.
@Yutaro-Yoshii
@Yutaro-Yoshii 2 года назад
I'll be abusing git tag from today! great video!
@AndreSomers
@AndreSomers 2 года назад
Only nowadays you don’t use ‘git checkout’ to switch branches, you use ‘git switch’
@Flexximilian
@Flexximilian 2 года назад
I was just wondering why he insists on switching with checkout. Was that actually the way to do it back then?
@Flexximilian
@Flexximilian 2 года назад
Oh wait... it's actually a new video (Feb. 2022), so he should switch with git switch...
@Ergzay
@Ergzay 2 года назад
@@Flexximilian I've never even heard of git switch. It must have only been added really recently.
@Ergzay
@Ergzay 2 года назад
Since when?
@Ergzay
@Ergzay 2 года назад
I just looked at my man file and it says "THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE." So no, you shouldn't be using git switch.
@gregoryfenn1462
@gregoryfenn1462 2 года назад
I can pull and push and commit but I can never fully understand branches. As in if I make a new feature branch to work on, suppose all I do is change one line of one code, do I save the whole repo as a copy or just the delta changes? How does git encode the changes when there are a mix of small and large edits? When there's a remote repo which I pull, and then branch, where am I? I sort of know the answers to these Qs but internally I just don't feel it. The interface to git isn't intuitive to me. Like adding which files to track messes me up. When I've commited foo.txt and then untrack foo.txt, what does git do? delete it? If I go to an earlier commit, is the file now un-untracked, or is it re-tracked? P.s thanks for the comments! As a final thought, the names are counterintuitive to me: why is checkout used to mean “change to”? To checkout something is just to look at it but not touch it.. that one still makes no sense to me
@scragar
@scragar 2 года назад
Git stores the patches in the commits, broken down if the commit is too large or contains multiple files(for the sake of tracking changes per file it makes sense for each file to have it's own patches as it goes). Git doesn't actually store the current version of the file, just the HEAD which is a single commit. That commit has the latest patch, and the previous commit. To build a version of the file all the patches are applied in the order they were committed(with a lot of shortcuts like reverted changes can just be skipped altogether). Think of staging(what you're called tracked) as a proto commit. Git has the patch for those changes ready to be written to a new commit once you're happy to finalise it. If you unstage it the file doesn't change, but the disappears from the patch it'll write as the commit(unless you re-add it). If you try to change branch while there's changes git will normally stop you and warn you that the changes will be overwritten. Forcing the branch change will do exactly that, but staged changes will remain in the staged area as a patch, but got will think there's unstated changes to undo it(because the file on disk was overwritten).
@scragar
@scragar 2 года назад
RE: remote repo pulled and then branched off, best way I can explain it is to say you're always on HEAD. HEAD is a reference to where you are. It can be in two states, floating(points directly to a commit) and fixed(points to a branch or tag). If it's fixed then you just look up the data from the branch/tag(both of which have a parent branch which always has to exist and a current commit which is the reference to the current latest commit on the tag/branch from which you can just follow the parent commits for a full history). Floating heads are weird because there's no parent branch, but you still have the reference to the current commit so the full history is still available, got just won't be able to automatically work out what branch should be the target for merging, rebasing or similar). So yeah, in the example you had you're on your local branch who's parent branch was the upstream branch with the latest commit being the same as the latest commit from the remote branch(that'd be fetched before you could branch off the remote branch BTW).
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 года назад
Your own local branches are quite separate from remote branches, and you can have any number of each. “git branch -r” show remote branches, while “git branch” shows local ones. Remote branches are copies of other people’s public branches.
@TesterAnimal1
@TesterAnimal1 2 года назад
Don’t worry about it. You can have as many branches as you like.
@tissuepaper9962
@tissuepaper9962 2 года назад
You're "checking out" the branch the same way you "check out" a book, or a piece of equipment from the store-room, etc. It's not "check out" in the sense of just looking at something. Use "git switch" if it makes you feel better, I don't remember what the actual difference between checkout and switch is though.
@AdisonCavani
@AdisonCavani 2 года назад
Nice
@FedJimSmith
@FedJimSmith 2 года назад
is there a version control suitable for binary files?
@Ergzay
@Ergzay 2 года назад
You can use git to store binary files, the problem is that it's necessarily inefficient, as is any binary version control.
@FedJimSmith
@FedJimSmith 2 года назад
@@Ergzay the diff doesn't make sense though
@ChaseFLable
@ChaseFLable 2 года назад
Good title
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 года назад
There is a word which is used a lot in this video, which you are not allowed to mention in the comments. Can you guess what it is?
@oded6188
@oded6188 2 года назад
More videos of that please!
@Zerendipia
@Zerendipia 2 года назад
=( thought it was a video to explain the weird magic git does when it merges.
@EpicWink
@EpicWink 2 года назад
git packfiles and general compression might be interesting to watch
@EgoShredder
@EgoShredder 2 года назад
So the absolute final versions are complete gits...
@ShubhamGaikwad23
@ShubhamGaikwad23 2 года назад
Why does git requires new TCP connection for every file it syncs from remote while performing git clone operation
@scragar
@scragar 2 года назад
That's because they don't manage the connections, they just trust libcurl to fetch/push the file they want just by calling out to it with no effort to track created connections and if they're busy or not. I believe it's possible to change this using a plugin called simple connection proxy which just acts as a proxy for the connections while maintaining it's own TCP connections to reuse them as applicable according to the settings(how many is the max it should open at once per domain/IP, max idle time, etc).
@ShubhamGaikwad23
@ShubhamGaikwad23 2 года назад
@@scragar I don't know about libcurl but from the name looks like it exposes curl APIs which is basically used for http connections. But git also works with SSH protocol. In case if git is using ssh then does it creates new TCP connection for every file?
@shauryabisht80
@shauryabisht80 2 года назад
Too early to comment anything
@sahilbaori9052
@sahilbaori9052 2 года назад
nobody cares
@CristiNeagu
@CristiNeagu 2 года назад
Git was created by Linus Torvalds, the creator of Linux. I think he once said that after Linux and Git, he should stop naming things after himself.
@oldcowbb
@oldcowbb 2 года назад
git gud
@IceMetalPunk
@IceMetalPunk 2 года назад
Okay, but if no one writes a Git reference book with this title, an opportunity has been sorely missed.
@glapos
@glapos 2 года назад
Great video! Thank you. Although maybe get a position where the sun is not in your face?
@akashpawar9058
@akashpawar9058 2 года назад
akash
@OrbitalCookie
@OrbitalCookie 2 года назад
You can not download the latest commit of Chrome - it's closed source.
@wwklnd
@wwklnd 2 года назад
Chromium, not chrome.
@aka5
@aka5 2 года назад
He said Chromium, which is the base of Chrome and is open source
@OrbitalCookie
@OrbitalCookie 2 года назад
@@aka5 Yeah of course I know that - I have fixed my comment to be less ambiguous. Most new listeners would not have registered that there is a major difference between Chrome and Chromium based on the video.
@t400ml
@t400ml 2 года назад
Git do some things very well but it has its flaws. I can't wait for someone to come up with a better alternative. We can do much better than git.
@SteveBurkert
@SteveBurkert 2 года назад
i.e? Am I right, you're talking about creating something better than Git, instead of improving it? So I guess it must be something fundamentally that you think is a flaw? Can you elaborate?
@IceMetalPunk
@IceMetalPunk 2 года назад
@@SteveBurkert I mean, I don't know what UltimateYT was thinking of, but personally I wish it handled merge conflicts of non-text files better than it does.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 года назад
Feel free to show us how it’s done.
@Hauketal
@Hauketal 2 года назад
Git *is* the better alternative. I still remember some older systems. Horrible.
@t400ml
@t400ml 2 года назад
@@Hauketal Yes you are right - Git is indeed the best we have right now. That shouldn't stop us from trying to do better.
@jozefws
@jozefws 2 года назад
Worst. Host. Ever.
@thebarnold7234
@thebarnold7234 2 года назад
Worst. Mentor. Ever.
@bob2000and10
@bob2000and10 2 года назад
For a second I thought this was Linus in the thumbnail and I nearly unsubscribed
@MichaelKingsfordGray
@MichaelKingsfordGray 2 года назад
Git follows after the style of its devotees: "C" programmers. "C" is GUR+ARANTEED to fail. So is Git. Bunch of unqualified amateurs!
@H4cK3r5
@H4cK3r5 2 года назад
Nice
Далее
Git Overview - Computerphile
16:28
Просмотров 187 тыс.
Model Driven Software Engineering - Computerphile
14:12
Cute Barbie gadgets 🩷💛
01:00
Просмотров 1,9 млн
Чувака укусил зомби
00:13
Просмотров 69 тыс.
ПАША ТЕХНИК. Прощай, Легенда #3
42:40
Internet Congestion Collapse - Computerphile
20:16
Просмотров 92 тыс.
Log4J & JNDI Exploit: Why So Bad? - Computerphile
26:31
Apple M1 Ultra & NUMA - Computerphile
15:24
Просмотров 254 тыс.
Mythical Man Month - Computerphile
17:18
Просмотров 135 тыс.
Reverse Engineering - Computerphile
19:49
Просмотров 182 тыс.
NixOS: Everything Everywhere All At Once
15:10
Просмотров 250 тыс.
How WiFi Works - Computerphile
17:19
Просмотров 196 тыс.
Uses of Information Theory - Computerphile
14:48
Просмотров 73 тыс.
Cute Barbie gadgets 🩷💛
01:00
Просмотров 1,9 млн