This is by far the best video I've seen on git. There's so many terrible git videos on youtube 🤦🤦🤦
@bool2max4 жыл бұрын
well, it is by MIT lecturers so no surprise there
@steveroger45704 жыл бұрын
Those terrible video tutorial probably are made for getting ads revenue, where the presenter might not even know or good at what they want to teach, and those terrible video are probably similar because they might refer to the same material from invalid or bad source (that's why valid good sources and citations are so important).
@je96254 жыл бұрын
Yes but it implicitly requires that that you have previous knowledge of git.
@LesterFD4 жыл бұрын
instead of watching "so many terrible git videos" it's also possible to read the doc or do hands on tutorials
@amannucg4 жыл бұрын
@@LesterFD Reading the docs is no substitute for videos such as this, or other deliberately didactic material. Docs are useful for reference, but do not do a good job of explaining the bigger picture, or the right mental models to use. Learning new systems is hard, because everyone reaches this point with their own thoughts and expectations, and the docs may or may not align. (Look up the video where Linux evangelizes git to the Google crowd, I think in 2007. The introducer says "no-one understands this"). One cannot memorize the entire documentation set, make all the needed logical connections, fill out the missing details, etc. For creations like git, human instruction is a big time saver. I write my own notes as I learn, to steer my mental models in the right direction. Stackexchange has been incredibly valuable. Git has its own concept of "time", of what version control means, etc. These are explained to some degree in the documentation intros, but it can be a challenge to understand. The writer of the documentation always makes some assumptions about the audience, and cannot (or will not) explain everything to its last logical detail.
@braveshine25794 жыл бұрын
31:42 git add . , git commit -m , git log , git cat-file -p 32:47 git commit -a , git add :/ 35:23 git log --all --graph --decorate 36:12 git status (have staged or commited or not) 41:41 git-checkout -f (switch branch) 43:11 git diff hello.txt (show the changes in the file compared to the last commit) 43:28 git diff hello.txt (compared to the branch) 44:33 git diff HEAD hello.txt 46:22 git diff git commit -m / git commit 59:37 dog points to the branch you're trying to merge. 1:04:17 git init --bare (initiatialize empty git repo in current dir), 1:04:20 git remote add , git push : 1:07:54 git clone 1:10:33 git branch --set-upstream-to=origin/master 1:18:12 git blame .config.yml (who edit the file on which commit message by who, when) , git show (to get line changes like git diff) 1:19:22 git stash (changes saved somewhere) , git stash pop (get saved back) 1:20:46 git bisect 1:21:48 git ignore (put file name or *.extension)
@karanvenkatesh80042 ай бұрын
One of the best git explanation videos. 1.5hrs well spent I must say. Thanks a lot Anish.
@guccifer78743 жыл бұрын
This is exactly the kind of lecture on Git that I was looking for. Too many of these "crash courses" just settle on teaching you the cmds and that's it. I think it's crucial to have an intuitive understanding of what's happening internally within git. The absolute best advice I could give someone trying to climb the otherwise steep initial learning curve, is to first fully comprehend the simple data/object model: how the repository tree is represented and versions of it are maintained; and the use of SHA-1 hashes to represent both file/object content, and most importantly how a hash (as a commit) handle uniquely defines a versioned state of the repo tree. I don't believe this point can be stressed enough: without an intuitive high-level understanding of what's going on internally, the task of learning GIT degenerates into a exercise of memorizing seemingly unrelated command invocations.
@danielgray80532 жыл бұрын
agree.
@nadaelnokaly4950 Жыл бұрын
this is exactly what happened with me and so I ended up, after more than 4 years in Tech, to re-learn git every month and feel the same stupidity😢
@cat-.- Жыл бұрын
Although I would bash the git CLI api as much as the next person, I struggle to find a way to fundamentally improve it. I guess git is trying to give you really fine grained control over what happens with your repo, and it's hard to design a concise API to do that
@marcodem38 ай бұрын
spot on
@harshteck4 жыл бұрын
This proves first "It's the teacher who teaches" and then "It's the student who learns ". The way the video is articulated shows how much effort the faculty has put in. Kudos to the teacher and to all the students you finally understood GIT from its core.
@leewesley4803 жыл бұрын
you probably dont give a damn but does someone know of a method to log back into an instagram account? I stupidly lost the password. I love any help you can give me!
@gannongraysen97493 жыл бұрын
@Lee Wesley instablaster =)
@leewesley4803 жыл бұрын
@Gannon Graysen I really appreciate your reply. I got to the site through google and im trying it out now. Looks like it's gonna take quite some time so I will get back to you later when my account password hopefully is recovered.
@leewesley4803 жыл бұрын
@Gannon Graysen It did the trick and I actually got access to my account again. I'm so happy! Thank you so much you really help me out :D
@gannongraysen97493 жыл бұрын
@Lee Wesley you are welcome :)
@BartVandewoestyne Жыл бұрын
Definitely one of the better introductions to git that I have seen. In one and a half hour, Anish succeeds in explaining the theoretical model behind git, and then goes from basic git usage over branching and merging to using remotes. And this all in 85 minutes. Well done!👍
@chilling000004 жыл бұрын
These students actually ask questions I want to ask, it feels so good...
@VamsiMohanKrishnaVadrevu4 жыл бұрын
This is the best Git Tutorial I've ever seen. And I've been using Git for more than a year with very little confidence. This gives me immense confidence in handling all the changes that my team does.
@takshpatel81092 жыл бұрын
This is the best video for git. Totally worth it. Whenever I have to recommend someone for git,I'll recommend this and say don't watch any video from KZbin until you finish this one
@waseemkntar25664 жыл бұрын
It was a unique lecture, you didn't just do commands like others but you explain the data model of git and things behind it. Thank you for this really missing things.
@seank91224 жыл бұрын
have checked 10+ git tutorial on YT and this is by far the best one with no doubt
@manarshawkey3 жыл бұрын
Great lecture. The first 25 minutes is an excellent example of a systems design interview question :')
@fergusonshuai3814 жыл бұрын
Learned many of those intricacies the hard way at work. It's really good to have someone pulling them together for you.
@mrMoneyTrooper4 жыл бұрын
One of the best Git tutorial available on YT.
@docteurklein4 жыл бұрын
At 13:35, it is said that the code of one branch could influence the behaviour of the code in another branch, and you wouldn't know before merging those branches. While this is very true, it is *not* necessarily a merge conflict. It could very well be fast-forwarded (ie. the 2 branches never changed the same line of code) and yet a new bug might occur. Only continuous automated tests can detect those defects, not merge conflicts.
@sebastianbraun24734 жыл бұрын
No Joke, this is the best GIT-Video I have ever seen.
@6kwecky64 жыл бұрын
Love the bottom to top approach of teaching this. Makes me more ready to deal with more complicated errors, and debugging
@gueyenono Жыл бұрын
Git has never made sense to me like it does now (despite using for several years) thanks to this video. I plan to rewatch it without coding along just to further cement all this in me. Wonderful job.
@toby9999 Жыл бұрын
I have been "using" Git for years. Struggling would be a better term. It's so bad that I'm considering getting out of software development. Had enough. Git is making my life hell. It's a massive time waster. It is completely unintuitive.
@surendrabisht2523 Жыл бұрын
I don't think any tutorial on git is upto this level. Thanks for detailing the commands and their actual syntax with clear understanding.
@treeman_mj4 жыл бұрын
I’ve had just enough git skills to get by in the job and this video has helped fill in several missing gaps. Worth watching this video and thanks
@ghostfjdgcsusvsgsj3 жыл бұрын
This has been extremely helpful to me as a beginner. I am grateful for having access to such a great resource.
@andiuptown1711 Жыл бұрын
Update? :)
@francescoyang4 жыл бұрын
I have been using Github for years but this was useful to actually know what's happening behind the commands, thank you so much!
@Chiramisudo4 жыл бұрын
What are your favorite commands from this lecture? I found all the best stuff to be in the last 10 minutes. My favorites are: *git add -p * (interactively stage changed hunks of a file rather than the entire file) *git show * (shows commit message and changes) *git bisect* (binary search commit history to find where a bug or change happened)
@tjbruno55004 жыл бұрын
I just wanted to give a sincere thank you for uploading these lectures!
@sriharidatta537711 ай бұрын
For any one learning, use git graph extension in vs code that will give a intuitive graphical view of all git commands.
@casedup4 жыл бұрын
All i can say is wow. Wanted to skip over this as i know a little about git but the way you explained the inner workings i really don't see how i can go wrong ever. Great foundation to start with look forward to re watching and studying this video and going thru the notes. Thanks!!!
@aavocadoToast4 жыл бұрын
This course needs to be in every university...
@jake31114 жыл бұрын
or just online for free oh wait
@ThunderAppeal4 жыл бұрын
Probably, if the universities are populated by idiots like you.
@jakobwachter51814 жыл бұрын
@@ThunderAppeal These lectures are from MIT.
@ThunderAppeal4 жыл бұрын
@@jakobwachter5181 I rest my case.
@jakobwachter51814 жыл бұрын
@@ThunderAppeal I would be very interested to see how your pedigree absolves you from recognizing that even very intelligent people can take a lot from these lectures.
@chaus08084 жыл бұрын
The video suggested on my KZbin and I wonder why but I ended up seeing it complete. First time I don't curse KZbin for random recommendations.
@enraycious4 жыл бұрын
I started getting agricultural automation, beginner rollerskating and "electro swing" dancers... go figure. Cool tho, watched a few
@unisos Жыл бұрын
I almost lost hope in understanding version control through git. Until i found this! Thank you very much sir
@MrSaurajyotikar4 жыл бұрын
I have been studying the pro git book but has been not efficient enough in learning. Following along the basic tasks of git with this video gives me a very speedy overview of the branching and merging. Now I feel confident to get back to the pro git book and learn the details. Thanks for the tutorial, Anish!
@thomasip99384 жыл бұрын
Make sure to also practice using git in real projects. Reading and using git is very different.
@DutchmanDavid4 жыл бұрын
11:08 I love how the arrows point in the correct way. Too many examples make the arrows point into the direction of the future. A new snapshot is based on an older one, thus the arrow should point towards the older snapshot!
@takatamiyagawa56884 жыл бұрын
Yeah, I learned that from git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell . Some things (like git log's output) make a lot more sense when you know that each commit has pointers to its parents, but not to its children.
@wesselbindt4 жыл бұрын
Either way sounds logical to me. I mean, if you think of it as kind of a family tree, arrows in the other direction makes sense.
@motilalchavhan70214 жыл бұрын
This is the best demonstration of git mostly people starts with commands and make some repos on github which is a very abstracted way of teaching git to anyone but in this demonstration they also explained the underlaying structure of git which makes it more intuitive to learn. I wonder why people start directly with commands. This is the perfect way to demonstrate the git to a beginner.
@abhishekshah114 жыл бұрын
"In pseudocode this looks like ..." and proceeds to write perfectly valid python code lol.
@Ragnarok5404 жыл бұрын
That's why Python is so powerful for newbies.
@abaundwal4 жыл бұрын
Wuuut? Lol.
@ProgrammingMadeEZ4 жыл бұрын
Back in the day the "pseudocode" was BASIC.
@spicybaguette77064 жыл бұрын
Any pseudo code is basically python
@konstantinrebrov6754 жыл бұрын
@@spicybaguette7706 No, not all pseudocode. There is C like pseudocode also.
@dochowell4 жыл бұрын
This long-time git user learned something new about git today. Kudos!
@rajibsarker37294 жыл бұрын
this is by far the best video on git.
@Kaltinril4 жыл бұрын
Used git for years, interesting to learn about the data model and the pointers.
@raunakkbanerjee9016 Жыл бұрын
The demonstration of branching and merging was beautiful
@myfavouritecolorisgreen4 жыл бұрын
my university doesn't teach git or vim and this git lecture has been really helpful. also loved the vim integration with git!
@harshivpatel62384 жыл бұрын
There are universities that team VIM and GIT ?
@primekrunkergamer1884 жыл бұрын
why on earth would u learn vim?
@epicbeans10 ай бұрын
i LOVE vim and neovim its like my son
@treeislife4 жыл бұрын
I have been using git for a while, but I found this lecture to be very insightful about git internal data structure. That pseudocode was great.
@shivamrishi93494 жыл бұрын
This really made me appreciate the genius of git and version control systems
@vigneshpugaz83084 жыл бұрын
Probably the 1st university to have a course on git and GitHub
@gururaghav69464 жыл бұрын
Very informative for someone who is just starting off with Git and GitHub. Thank you very much.
@DutchmanDavid4 жыл бұрын
Here's my explanation of a hash function: You input some data and the output is a hexadecimal number. If you change the input a little bit, the output will look wildly different. You can use this to confirm you have an unchanged file from a website. If I have program P and I say the hash is X, you can download it, recreate the hash and if you *don't* get X, you'll know it's an edited file. Well known algortihms are MD5 (outdated), SHA1 (outdated, though still often used), SHA-256 (current), though there are many more algorithms. An input/output example for SHA-256 is: input: Hello World! output: 7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069 input: Hello, World! output: dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986f As you can see, the hashes differ wildly, even though I only added a comma to the text!
@ezio9344 жыл бұрын
Pretty much true but a hash function is defined as a function which take some data. Play with its bytes and returns a hash. Its not necessary to return a hexadecimal value. But a each input should have a unique and consistent hash.
@davidjohnston42404 жыл бұрын
@@ezio934 There are some relatively important details - The input data size to a hash function is arbitrary but the output size is a fixed number of bits. The algorithm should exhibit 1st preimage resistance (given y, it is difficult to find an x such that h(x) = y), 2nd preimage resistance (given x, it is difficult to find a second preimage x′ ≠ x such that h(x) = h(x′)) and collision resistance (it is computationally infeasible to find any two distinct inputs x, x′ that hash to the same output). Sadly SHA-1 Which is used by git does not have all these properties.
@fest1ck4762 жыл бұрын
This is the best way to start learning git.
@manbingable4 жыл бұрын
this video explains the core of git. it is really really good
@nav-ks6qj4 жыл бұрын
The lecture was informative with lots of repository in depth ways to grab data efficient time saving which I really like grab a certain command and everything's there at your disposal also ,this no where near what it's capable of man god stuff
@elliotho30152 жыл бұрын
Brilliant Lecture! This is the best lecture about Git I've learned :D
@lkdhy-rc7ep11 ай бұрын
How come this is so fantastic ... I'm fully impressed.
@skfjhsdjklfhsdjlfhsd4 жыл бұрын
Wish I could "like" this video several times... Thank you for this training!
@pepebawagan67144 жыл бұрын
closed captions at 16:07: [Applause] lol
@jaminoes_3 жыл бұрын
The second part is the typical professor going at his owns speed without making eye contact. I was so hopeful.
@ashrasmun14 жыл бұрын
unbelievably useful lecture. 1,5h and I can rightly call myself a beginner :)
@jimitgohel4 жыл бұрын
This is gold. Perfectly explained.
@yavartaghipourazar49674 жыл бұрын
One of the best lectures on git, thanks for sharing
@uuu123432 жыл бұрын
"On a higher level....nevermind, I think this is sufficient - you can ask me afterwards" - Hash Functions I relate to that so much when explaining, THAT becomes so big, really quickly
@Hitz90924 жыл бұрын
Very useful tutorial on git especially in terms of understanding the data model, and remote interacton. Thanks !
@nerd25446 ай бұрын
if there was one video humanity should preserve out of all videos ever created it should be this one absolute tragedy that no other git guide teaches the actual data model or from the bottom up and all of them if they use a graph always make the commits point to the next commit wrongly.
@alfredopazvalderrama19354 жыл бұрын
thank you so much for upload this video, I just share it with my students and next time I will start to explain GIT from the model!
@prosy17194 жыл бұрын
This was really a big pleasure to watch this nice lecture. Thank you so much.
@FryRey3 жыл бұрын
25:00 I actually have a question. What happens if we need to roll back and get to the previous version? I suppose it doesn't delete anything but does it, like, create a new branch or something?
@mobilecodemedia47114 жыл бұрын
3:48 Git Bisect has saved me tons of time.
@mohamadsalehshojai259 Жыл бұрын
you can also add title on 1:02:05 for remotes
@marcelstrzalka4 жыл бұрын
An excellent lecture on git basics, I really liked it.
@zikaperic21334 жыл бұрын
It is very important making meaningful git messages, yet let's add "x" as message :)
@mikepavelhsu4 жыл бұрын
Love this lecture, have been using Git/ GitHub for years but still don't know some of the basic idea.
@BlownBones4 жыл бұрын
I don't usually comment but I had to say it. This is good content. Very Helpful!
@NirdeshM4 жыл бұрын
My sincere thank you for the lectures, this is so far the best material on git.
@TamLe-sh2ru4 жыл бұрын
I dont know why this in my recommendation, but thanks you very much sir.
@qamalnilom17152 жыл бұрын
I have a question if anybody can verify please: In the pseudo code, type tree is defined as : type tree = map. The key is the directory name and value is the actual content which can be a blob (file) or another tree (folder). If I'm not wrong maps cannot contains duplicate keys. If my assumption is correct, doesn't the definition imply: tree is a map from the folder name to one file or one onf folder?
@fredoverflow2 жыл бұрын
The string in the map is not the name of the tree currently under definition. The strings in the map are actually the names of the CHILD trees and child blobs!
@QuicksilverSG8 ай бұрын
TL;DW: git status TL;DW: You are in a maze of twisty little passages, all alike.
@patrickmullan83564 жыл бұрын
At 33:33 he says, you can add the "fixed +1", but not the prints() I used to track down the bug? Does that mean I can add only one particular line of a file and ignore other lines that have been changed _in the same file_? How? Edit: Aha. Probably with "git add -p file.py", explained later at 1:16:36
@tipeon4 жыл бұрын
Nice presentation. I'll definitely steal a few ideas next time I train someone on git.
@edessarc4 жыл бұрын
excellent, it helped me a lot as a newbie in Git
@AsvinAluminiumKumar Жыл бұрын
How is he able to rename different windows in the terminal at 1:08:00? Can anyone please help explain that? 😅
@py43114 ай бұрын
good lecture, I want to add 2 cmds for noob just I used them a lot at the beginning, git gui which provides a gui for those are not proficient about cmdline, and git add -i which provides more subcommands, then you don't need to read doc when you can't remember correctly.
@mihirravitej4 жыл бұрын
This lecture is pure gold. Thank you so much!!
@TroyArrandale4 жыл бұрын
Great content git should be taught at every university!
@rasalas914 жыл бұрын
Hi, just a maybe tip for feature lectures: 17:00 Instead of waiting and then asking "Any questions about that?"(which nobody but that one person will ever answer to), I think it would be a huuuuge help (especially for introverted people) if you could just point out the knowledge that you'd need to understand what you just wrote - in short. I for example forgot or didn't hear what the variables "blob" and "tree" are for. I kind of zoned out for a second. Like "So that blob is just the data, the tree is a file or folder with that data, and the commit contains that data". or better backwards: "a commit contains that data[parents, author, message, snapshot], the snapshot is data[point at blob] within a folder structure[point at tree and then the blob in the tree]" Also helps to strengthen the knowledge of people who already got it but are not quite sure. (I can rewind a bit on YT, but your students (the ones you asked) can't. And I personally would never want to waste the other people's time by asking about something that I didn't quite get, because I made the mistake of not listening.)
@shawnxihaowu76382 жыл бұрын
Thank you so much for this lecture!! The lecturer is so awesome!!
@Fraket4 жыл бұрын
By the way, that tiny URL goes to a Google docs survey entitled "6.s089 Logistics"
@mybigbeak4 жыл бұрын
Thankyou. I finally feel like I get what's going on in git
@tileq4 жыл бұрын
This lecture is a masterpiece.
@naveensd1014 жыл бұрын
37:50 did he change his t shirt
@emaayan4 жыл бұрын
i'm at 25:13, and thing i don't get , is that it seem the each commit maintains (or references an entire snapshot of the repos, as it would duplicate the snapshot cor each commit, which doesn't make sense, i thought it only saves the delta between each commit) it also looks like if id uniqueness is maintained by content alone, them having a snapshot, making a change, committing, deleting the change, and committing, would make it like this commit would overwrite the previous commit as they are both identical content wise.
@fhajji4 жыл бұрын
If you do that, the meta data of the blob, such as e.g. modification time changes, and therefore, you get another hash.
@jacobwojcik98882 жыл бұрын
Hello there. I wanted to see if anyone could provide an answer for an observation I made while following the tutorial. When I create the initial commit, the log shows the blob and tree with the EXACT same SHA-1 value as Anish's. I was a little perplexed by this because I thought the SHA-1 generation was designed to create unique values for objects. The StackOverflow forums only referenced commit collisions. My commit is indeed very different than Anish's, but I was curious about the blobs and trees. Does the Index file have built-in functionality for those types of objects where it simply repurposes SHA-1 values? This wouldn't make sense to me because I am under the impression that the Index file generates the hash string for commits as well - and then could create the same hash for a commit as a "repurposed" blob or tree hash. Thank you in advance for any info.
@StrangeIndeed4 жыл бұрын
best intro to git ever, love that guy c:
@Mr_ToR2 жыл бұрын
after fixing diff, I just did a commit -a instead of merge --continue and it created the result as merge --continue. is there a specific reason to use merge --continue ??
@una19754 жыл бұрын
This should be the 1st course for every group coding assignment. In a team without version control is basically a hot mess.
@salman44304 жыл бұрын
Thanks for adding the lecture notes!
@RektYuan4 жыл бұрын
So does anyone know how the instructor advise to use dropbox with git?
@funnygeeks81264 жыл бұрын
51:47 what is that vim sorcery? Each line has an associated letter.
@TheSkynet13374 жыл бұрын
I think its the Vim plugin EasyMotion(github.com/easymotion/vim-easymotion ).
@SH-vi7co3 жыл бұрын
At 21:33, wish someone had asked, how does Git guarantee no duplicates of hashes?
@SH-vi7co3 жыл бұрын
So that was a dumb question, late at night after drinking a beer or three. Ot, at 24:21 he makes the important point that the graph is immutable
@fredoverflow2 жыл бұрын
Git cannot guarantee no duplicates of hashes. They're just incredibly unlikely, because the universe of possible git hashes consists of 2^160 distinct values.
@XDBjoernXD4 жыл бұрын
Very good lecture. The explanations are spot on!
@jacobwojcik98882 жыл бұрын
An additional observation...I noticed during the cat functionality addition diff that the file had a SHA-1 hash even before it was staged. How can that be? I know that it will be given a ID when staged, but it seems that it is already given a value BEFORE you decide to stage it.
@JannisAdmek4 жыл бұрын
marvelous lecture, was perfect for my commute just now.
@nidhinsnair4 жыл бұрын
This is gold. Learned a lot.
@andrewmurdoch72464 жыл бұрын
You should review tags, signing and audits in the basic GIT lessons. It's REALLY important for developers to understand why they need to sign their code and sign their commits, not to mention carrying a proper audit across the GIT tree. Otherwise awesome GIT lecture.
@N7Tonik4 жыл бұрын
Thank u! Learned a lot. Whole different picture of git now
@geraldito44 жыл бұрын
Excellent Lecture
@ankurshukla4944 жыл бұрын
Such a nice video, learnt new things. Thanks a lot, totally deserve a +1.