Placeholder Image

字幕列表 影片播放

  • Thank you for the grand welcome.

  • This is not my first dog, but still, it feels like I'm giving for the first time.

  • This awkward feeling is undescribable foot.

  • Let's get started.

  • So let's tame Udo service.

  • I just wanted to give it the git workflow you deal with every day.

  • I ask you to answer this because it's Yeah, it's just crazy.

  • So why a dog can get, um I'm pretty sure, like many off.

  • You want to know why?

  • Because we have a lot of resources online and we have a lot of thoughts, but I have all certain incidents which I wanted to share.

  • Um, I have seen Lord of Developers, and some of the students have mentored in the past.

  • They have set off 3 to 4, get commands written on a text file and that they just use them so that they can create a request, something which goes beyond beyond those commands.

  • That's it.

  • They tried to delete their and our clone for whatever it is and redo everything.

  • And we have to admit it.

  • We must have started off like that and not really died.

  • One of my friends said that I just ask, can you explain me?

  • What get is the first time I was trying to clone?

  • Market get is a magical tool, and there's something magic happening.

  • Yes, it's a magical tool, but it's what's happening behind the scenes.

  • It's not magic.

  • We can understand what's happening there.

  • So with that, let's get started so small in direction about myself on muscle for Internet sales force a disclaimer.

  • I'm not a friend and develop a routine at the end, and I'm a release lead for documentation in communities.

  • If you have any complaints about the docks related to humanity's come to me and I'm an ardent open source contributor.

  • Ah, if you want to know how to get started with any open source project, I'm there and that's my Twitter handle.

  • If you want to just say hello, my dealings are open.

  • Um, that's about me.

  • So some quick things to understand about so I don't want to give a definition, but some things which I feel like we need to know about it.

  • So, yes, we know it's a version control system, but first get what did us.

  • It's simply tracks your content.

  • It's a simple condom.

  • Tracker attracts all the files and folders you have in your positive, That's it.

  • And just remember that, and the second part is the dog good folder.

  • It's a magical folder because it's hidden, Um, but you can still find it.

  • So it is the heart and soul off your get deposit trick.

  • So when you initialize or get depository, either by cloning an existing one or initiating an empty depository, the first thing get does is create this dark get pulled off.

  • And this is the folder that stores all the data history, everything related to your positive.

  • And then you better say that when you clone someone else, it's a positive.

  • So what exactly is happening there?

  • Is it just copies All the contents which are inside that Get fuller, that's it.

  • And try to open the gate full of it.

  • You have your any off the depository and just explore what's happening.

  • They're going for there will be talking about some of the important files we need to know.

  • Um, and the third important point, which I want to make sure get, is a tool which wants to make your distributed development will flow life simpler like every positive in your workflow is important and it have the capability to replace that, the one at any given point of time.

  • So no depository is central over here.

  • With that, um, I want to discuss some of the important terminology.

  • Beat me.

  • Kind of come across these different terms whenever we get to see some get errors or whenever to be the easy read.

  • Some get documentation often get confused with some of these.

  • So I just want to clarify or give a clear definition.

  • Um, remote depository, local depository index working three stash.

  • So I will explain this five storms together that this diagram Ah, all it actually defines your good work flow.

  • So let's start with the 1st 1 um, remote depository.

  • Ah, People also say it's upstream depository on an origin.

  • So in most cases, your remote repositories toe which all your team members push changes or fact changes from and such a remote repositories actually exists on some court hosting sites like get up, get lamb or whatever.

  • If you have an internal server forcing yes, it exists.

  • And that is Carla's.

  • That is known as report promoter Positive.

  • Now coming to the second term local depository.

  • Um, get local depository is the one which we make all the local changes to It is in simple terms.

  • It's nothing but your dog.

  • Get fuller in your computer.

  • That's it.

  • And the third important, um, index, um, get index is used as a staging area.

  • We have We might have heard the Tom staged staged area, right?

  • So that's nothing but the index idea.

  • It actually sits between your walking three on the local repositories.

  • So the significance off this particular area is whatever file you add into your staging area, come whenever you come it the fire off.

  • Whenever you want to make a comet, it will pick the files which are there in index Syria.

  • It won't take the files which are in your working three or your local positing.

  • Now it will just touch the files which are sitting in hearing that, and it plays a very significant rule.

  • Um, for example, when you run ditch data's, you usually see files in your staging area and green text.

  • Um, that means you can only come in the file, which is in green text and also get status is very helpful command.

  • When you actually sit and read what's going on there.

  • It will give you all the details.

  • It will give you instructions on how you can stay your file, understand your file or check out.

  • It's It's a very helpful Goemon.

  • And also, when you expand the dog fuller and see look out for the index file.

  • It's it existed.

  • Whenever you are, the new file get will be making some changes to that next fall.

  • And if you want to open this particular file and see what's getting added, it's it's actually some weird court.

  • I will not be understanding.

  • But yes, um, there'll be something in that particular file now coming to the food Don't working three.

  • Okay, so this is also a very important tone.

  • It consists off what your current are your current working snapshot.

  • When I say that if you have two different branches, if you have a free to branch and you're working on that you're working, we will just contain the files which are there in that particular feature bunch.

  • It won't count in the files returning Master branch unless you switch.

  • So this context switching is sticking by.

  • Taken taken, care off the working three area now coming to the fifth, um, the most Tom's node area.

  • Or don't stash, um, the only one only duty off Stashes to keep pr working.

  • Three area little clean.

  • So there are certain situations where you try to switch ah, branch or make some changes.

  • Um, when you have certain uncommitted fighting, you're working tree, it won't let you do that.

  • And in that scenario, you can actually save those files into your stash area and then reapply them whenever you want them in your working tree.

  • And it's actually a very helpful area.

  • It comes in handy.

  • Okay, now comes another important dome head.

  • The question now is when you run, get branch some branch name.

  • How does get no, the shot off the last comic?

  • It's because of the contents in this file, um, head is a reference to the last commit in the currently checked out branch.

  • On other useful in Francis you can get from this particular head pointer is determines your current working branch.

  • So normally, when you check out to a proper branch name, get automatically moves ahead, pointer along whenever you create a new comment in that branch, so we will actually see the significance of this point of when we learn about branching.

  • Um, and if you want to know more about this particular pointer, you can simply run, get log and I'll give.

  • Okay.

  • Okay, so that's a comet hash.

  • And beside you always see some domes.

  • So what you can in four from this is that head is actually pointing to your master branch.

  • And your current branch is master.

  • And they're also other tones like Arjun Master and Arjun Head.

  • They are the pointers which are in your upstream depository, and that's where the auction repositories is there.

  • So if I actually show you a visual ization off this, the box is optional.

  • Depository.

  • If you assume that it's name is Arjun and those are the pointers in there, pointing to the comics eatery and the box below is what is there in your local depository.

  • So it always carries those remote pointers so that it will let you know whenever you're our local repositories, not up to date with the option depository, and that's so good knows that.

  • And also when you arm expand and see what's there in the head head file, it actually exists inside the dot get folder it actually tells Get what is a parent for your next comet.

  • And that's where it tracks the branching and all the magical stuff.

  • But don't worry.

  • I'll be clearly explaining with examples going for them, um, and not to me.

  • Off get oscillates.

  • So some of the important internals off get which we need to know.

  • Um, it's nothing but the contents which are inside the dock.

  • Get folder.

  • We have already seen What head file is index file.

  • Is there some other important folders and files which I want to discuss?

  • Um, dog gets slash conflict.

  • We only if you're familiar with this.

  • Okay.

  • Okay.

  • Okay.

  • Lord of them.

  • So this is the first internal file which I would like to talk about because this is where all your get configurations related to your git Go stand over here you can define what is your option Repositories is what you're Arjun.

  • Deposit is our do some branch configuration, Bush configurations.

  • Everything goes in that This is the central conflagration file, and and this is quite important.

  • It actually sits in tow inside the dog it for you.

  • And now coming to the next important.

  • Full of that is dog gets slashed wrists.

  • So what exactly is the ref?

  • Ref is an indirect way off referring toe a comet, and you can think off it as a user friendly aljaz for a comma.

  • Tash, we need not really remember.

  • The gate doesn't really have to remember the entire 40 character hush.

  • So, Agent, it simply keeps track off the files under this photo and riffs are stored in a normal text files and the dog gets slash reverse directory.

  • For example, if you open the head directory, um, the head directory inside the lifts um, you will have the list off files which are nothing but your local branches.

  • So suppose I have Master Branch in my local depository I will be seeing over there.

  • And if I actually opened what's inside the Master Fuller?

  • There'll be another file which contains the latest comet in my master ranch.

  • And that's what keeps track off branching.

  • Even this particular full of plays a role in branching now comes to the dog gets ash objects.

  • Fuller.

  • This, um, this is the meat off the entire dot get or you'll get depository.

  • I say that because it contains all the files and folders which are present in your local A positive and the files are actually stored by the sharp values over here.

  • Um, you can see those were characters, so the biggest arranges them is like unfold a structure.

  • So you re not really worry about that.

  • And so I would like to discuss more about get objects because all your data actually goes into it.

  • So first thing, it's the meat off your local depository.

  • So that means it contains the actual data off off your get a positive.

  • And the second thing is, how does get track are stored all your files and folders in the form off objects and in the form of those four different types of objects blocked three comets and tag.

  • So I will be talking about the 1st 3 off for three object types.

  • And yes, they're stored by the shore values, as you have seen before.

  • Okay, let's take an example that we have this particular depository and full of structure in your local depository.

  • So we have a root folder we have to our text files, read me and make file and a slash SRC fuller and our dot see full profile inside A s are sinful.

  • So let's see how get actually stores them in the form off objects.

  • So coming to the first basic object type gets towards your file contents as blobs.

  • So it is important to know that it just does the contents of your files, but no the filing.

  • So the names and moors off the files are not stored within the blob.

  • I'm just trying to repeat it again.

  • And Gittel only stored our blob only once.

  • So when I say that, what it means is, if you have two different file names but with the same file content block get will be storing that particular file as one single blob because the file gunman, Sussie and what does what it also means is whenever you try to transfer some of the blobs from your depository to without the depository.

  • If if it's the same blah But, um, coming from two different file names, it will just transfer that single blob, and then it will expand it into a different different fights.

  • And, ah, foot out example um, our depository, those files those files are being stored as blob with different Ah, shock ports now coming to the next type of get object.

  • Three.

  • It's all the problem of storing the filing, and it also allows you to stole the group off files together.

  • That is the directory or folder, and a tree is nothing but a simple list off trees and blobs.

  • Ah, coming together along with the names and the file wards off those blobs entries.

  • And when you actually go and expand one of the three objects, you get to see something like this if you, um it actually contains entries of the blob under the particular tree, the file moored, shackled and the filing.

  • And I just tried to wean own experiment with some of the three objects he will definitely get get get an idea about it.

  • And for the same example, if you see, um, every folder is actually stored as a tree with, um, whatever fileid have within it.

  • Okay, Now, coming to the third object I'd commit, um, so we are storing the files and follows.

  • Where exactly does the history part comes in?

  • This is where comet objects are coming handy.

  • So the comet object is very simple.

  • It's much like a tree.

  • It's simply points to a tree and keeps a track off the water.

  • The ah, the Commitments Age and sometimes stomp around it.

  • Along with that any parent committed, it's pointing to.

  • So if you if you actually open, I'll commit Optic Um, you will get to see the snap shirt off for that particular commit are supposed to.

  • It's a tree and the hash along with that.

  • And if there is any parent comic, it's pointing to the hash off that particular previous coming along with the outer commuter information and the comet message.

  • So you will.

  • You will actually see all these things when you try to open up these objects and see.

  • All right, um, done with the boring stuff.

  • Um, we have understood how file stores are your data and some of the important tones.

  • Let's discuss with discuss about some of the scenarios and concepts with retreats trouble every day.

  • First thing is branching.

  • Um, as developers, we all know how important branching is in order to maintain a clean overflow.

  • And if you are open source maintainer for any big project, you definitely know the pain off merging branches and sometimes you know it's very important to know how exactly get those dispatching.

  • It will definitely make your life a little easier.

  • So let's understand what how branching is done and get it.

  • Okay, let's say we have these three comets on your master branch where my head is pointing to the latest comet.

  • See three.

  • Let's examine the state off a branch.

  • So how can I do that?

  • As in Cleveland, get log so that I can see what is exactly happening in my work.

  • Working treat.

  • So what I do, I don't get log, and I get to see the list off three comets and some important details.

  • Besides the latest coming the top one, this is the day's gone for Budapest official website apply.

  • Have clone it and it's exposing some female ladies.

  • And so what, exactly you can infer from this.

  • It says that the head is pointing to the master branch and you can also see your upstream pointers along with the later store coma.

  • Tash, as we have already seen now what do I want to do next?

  • I want to create a new branch called React to meet up Um so that's the only branch name I got to my mind when I was preparing the slights.

  • A sensible name.

  • So I just used it.

  • So we can do so by running the command, as you can see Get branch and the branching.

  • Now, if you want to see the list of branches you have in your local depository and also some important details on what is your current branch?

  • Um, you can run the branch, and then it will clearly tell you that Hey, you're on muster bench.

  • I'm making it in green.

  • Okay, Now, um, I have created a new branch.

  • Um, What has happened?

  • Head, My head pointer is still pointing to the master, but because I haven't switched to the newly created branch it so let's so let's just see what get long talks about this workflow.

  • So when everyone get get log, it still shows that the latest comet is pointing to Master.

  • We still have our Arjun or upstream.

  • Positive point is pointing to the latest committee and we have the reactor meet up the newly created branch still pointing tow the latest comet.

  • Okay, now let's switch to the newly created branch.

  • How can I do that?

  • I'll just run.

  • Get check out the the branch name which have already created and you can verify it by running.

  • Good branch.

  • Okay, now I'm will react to meet a branch.

  • So what has happened?

  • The head has moved to the newly created branch.

  • So it's pointing now.

  • So the reactor meet up.

  • Now you're working.

  • Triple will be.

  • Ah, whatever you Whatever changes you make from now on, we'll be going into your reactor meter branch.

  • Now, if I don't look good, get log for this particular workflow.

  • What?

  • What exactly choose?

  • Um, you can see the difference, right?

  • So the head is actually pointing to the reactor.

  • Meet up the newly created branch and my master is still having the latest comet in its workflow.

  • And my upstream pointers are still on the latest comics.

  • The last comic.

  • Okay, awesome.

  • Now we are able to create branch.

  • We have understood how it actually moves the pointers, the significance of the head pointer when it comes to branching.

  • Okay, let's let's do something more to it.

  • Let's add some more committed to react to meet a branch toe have added some comets and this is how my vocal would look look like now.

  • So have other seafood and see if I commits to my reactivate the branch and my head is still pointing to react to meter branch.

  • Everything is awesome.

  • Now I'll run, get log What it actually tells it Does that my head have actually moved little forward.

  • It actually divers, Um, it's pointing to the reactor meter branch.

  • The top Come.

  • It is nothing but the C five, which have which have shown you in the previous diagram.

  • And if you go to comets below, you will see the master branch.

  • It's It's somewhere behind right soul.

  • Now you can we can read get log clearly.

  • All right.

  • Um, now let's switch back to Master Wrench, um, and see what else we can do.

  • So how switched back I run.

  • Get check out, Master, and I'm back on Master Blanche.

  • I have very fight it by running.

  • Get branch command.

  • Um, so what exactly That commanded the checkered master.

  • It actually did two things in move the head pointed back to the master Muster branch and it reverted the files in your local or in a working directory.

  • Back to the snapshot.

  • The master is pointing to So this also means that the changes you make from this point forward, we'll get divers from your react to meet a branch.

  • Okay, Let's, um Let's see what get Log tells now.

  • So I run Get log in this current situation.

  • Um hey, it's back now.

  • I won't be seeing those stop to newly added commits on reactor meter because us, which completely master and my head is clearly pointing to the master branch.

  • Awesome.

  • Now I'll go ahead and add some comets on Master Branch.

  • Um, you can clearly see it has diverged from the reactor meter branch and the head pointer is yes, it moved to Miley Newly added comet.

  • Okay, awesome So far.

  • Now, where exactly is my origin slash master?

  • The art of upstream repositories markers.

  • It's still behind because that's where it is an option depository.

  • And the newly added changes are in my local repositories.

  • So if you actually run, get log for the scenario, you will clearly see it will clearly tell you that head is pointing the master and the top one is a newly added comet and my upstream markers are somewhere behind um, the latest comet.

  • So awesome.

  • Everything is like going great.

  • Now let's come back to our current working state off our working directory.

  • Now, if I just want to, um, change the comet, see six.

  • I mean, I just want to move the comet, see six into my reactor meter branch.

  • Um, I don't want to most them or do anything else.

  • I just want that single comet into my reactor meter.

  • Something like this.

  • Like, I just want to move it into my reactive meter branch.

  • Um, here comes the concept.

  • Cherry picking.

  • Who doesn't love cherry picking?

  • Um, yeah, and good.

  • It's more fun.

  • So what exactly is cherry picking?

  • It's the act off picking a comet from a bank branch and applying it to another branch.

  • That's it.

  • And get cherry pick can be very useful for undoing changes.

  • So these other steps how exactly can do it copied the committee.

  • The comet hash switch to the branch to which you want to apply the comet.

  • So in my case, I want to switch to the reactor meter branch and I'll run cherry pick.

  • So here I do.

  • I check out to the reactor meter branch.

  • That's what I want to add to come in two, and then I will do off the cherry picking off the comet, which is there in the master branch.

  • Okay, awesome.

  • Awesome.

  • But, hey, I got too much conflict.

  • Um, yeah.

  • When you see this message first thing, do not panic.

  • Okay, Um, don't panic.

  • Don't even try to delete anything.

  • It's okay.

  • Um, and always remember, get status is your friend.

  • So whenever you see a much conflict doing something, just type gets data.

  • Lt's and see what it tells it will give you some helpful commands and helpful steps You can do so when?

  • When I language status for this workflow.

  • Um, I have clearly seen it clearly Say, is that Hey, you read me dot MD file Have a conflict.

  • And what you can do is resolve this conflict.

  • Are you a file to the index area and simply continue the cherry picking command?

  • So it clearly gives to the instruction saying fits the conflicts and run.

  • Get cherry pick, hyphen, hyphen, Continue.

  • Super helpful.

  • I can never forget this coming, so Okay, fine.

  • That's fine.

  • But how do I confirm resolve the conflict?

  • Yes.

  • Using some of the tools with which you're comfortable is, It's great, but it's still important to know howto read the comet are conflict markers.

  • So first thing is, we need to understand what?

  • Get this trying to say.

  • So anything between the 1st 2 markers, I wish this work.

  • Okay?

  • Yes.

  • Awesome.

  • So anything between this and this too.

  • Marcus it These changes are actually water present in your currently checked out branch and anything between these two.

  • Marcus, are the changes which are present in your master branch from the cherry picking call Mackel.

  • Our Children picking commit changes.

  • This these others.

  • So always remember anything which goes in these two are the changes which are locally You're on.

  • So these changes are the first to check.

  • This particular line is present on the reactor Mito branch and these changes are actually present in the comet, which is present on the master branch.

  • Okay, once you know what change you want to make sure you delete those were markers.

  • And also the what?

  • Okay, Yeah, make sure you delete the extra all these extra markers and also the, um, unnecessary change.

  • Use your best knowledge and judgment when to make do how What you want.

  • Okay.

  • Awesome.

  • now I have resolved my conflict have continued with the cherry pick.

  • And this is what my current workflow contents.

  • Okay, so I have successfully cherry picked this particular C six.

  • Come it into my reactor meter.

  • Commit my head pointed is automatically moved to the latest.

  • Come it Awesome.

  • So I have all these comets in my current working directory.

  • Okay, One more thing which we need to remember is whenever you do run, cherry become command.

  • It won't be lead deep.

  • This oil oil commit.

  • So I don't want her to be on Master Branch.

  • What can I do?

  • Um, forcing.

  • I've, um, switch back to the master branch.

  • So if you remember, I was on the reactor meter branch, I'll switch back to the master branch because the comet which I want to delete his own master branch, see six.

  • So I'll switch back to Master.

  • As you can see, the head is pointing to the master branch.

  • And also note the paid and comfort for C six, the comet which I want to delete this century.

  • Okay.

  • I run the research from command.

  • Very, very helpful.

  • You know, some things when you want to Just under your committee or you're embarrassed of the comet message you have done.

  • Just run, get reset.

  • So I run, get reset, hyphen, hyphen, hard head till one.

  • So I'm saying what I'm saying is I'm telling it to move the head pointer off one comet backward that is moved to the parent committee off the comet, which I want to delete.

  • And yeah, that's it.

  • You will not have the changes in your local working directly.

  • So the arrogant lot of arguments related to it.

  • Bird, I will not go further from here.

  • Um, again, One thing you need to remember, whenever you delete this C six comet it it is the leader from your branching.

  • The pointer is like, removed from it, but the good, um, but the comet will be still existing in your local directory.

  • Ah, if you actually open the gate object Fuller, you will still see that hanging it on there.

  • So that's where the good G C command comes in handy.

  • It's a garbage collector command, but get just running it almost.

  • Although comets, which are hanging it on there pointing to nothing.

  • Okay, I'm running out of the time, but this is the last one.

  • Okay, Do with it, Muddy.

  • Hey, I won't talk about it, so I will not leave the stage without completing this.

  • So?

  • So if you're a mention off any project, I feel you.

  • Okay?

  • Morning is not easy.

  • So let's assume that this is my current work flow.

  • Okay?

  • I have thes comets on May react to meet a branch and that's my master branch.

  • So now I want to merge the reactor meter branch into my master branch.

  • Okay, so Well, how do I do it?

  • I switched to the master branch because that's what I want.

  • Too much the changes in tow.

  • So I switched back.

  • The head is pointing to my master branch now, and I ran get much react to meet up.

  • That's the black church.

  • I want to merge in much the changes from and again.

  • I warn you, if there are any much conflicts, it will tell you and you know what to do.

  • If you see a much conflict right, I'm sure you're confident now.

  • And what exactly good us is get creates a new snapshot and it automatically creates a new commit pointing to both off these comets over here the comet see six and see seven And something which is special about T eight is it's known as much commit it points.

  • It has two paid income.

  • It's that c seven and see six.

  • And this once the model is successful, the head point is automatically moved to see eight.

  • And always remember if you're done with the branch, please, please please delete it.

  • It will just makes your log looks the blanket Go Flo looks shitty.

  • So please remember that And the march which have just shown you is a tree very much there.

  • There's another type of for much which I don't which I don't want to talk about right now.

  • But yeah, that's about magic.

  • As if either no conclusion get is not has Katie If you think like if you just sit some arm suit on some git workflow and spend some time to understand no branching and this all day today commands were on, you will become a pro for sure.

  • And some of the important ah resources Yes.

  • Ah, the documentation we have should scare offered, but it's it's very useful if you actually understand some off the terms.

  • It's very useful and Also the get broke bro Book is amazing.

  • Just ah, Google.

  • Forget bro book.

  • It's it's open source.

  • It's I talked about different scenarios.

  • Ma Jing re basing all these different concepts.

  • It's amazing.

  • Give it a try and hey, that's all.

  • You can tame the guitar serous.

  • Be confident in water command.

  • You run, You can definitely do it.

  • And that's the end.

  • Thank you.

Thank you for the grand welcome.

字幕與單字

單字即點即查 點擊單字可以查詢單字解釋

B1 中級

Taming `Git`osaurus Using Mystical Trees by Damini Satya Kammakomati | JSConf Budapest 2019 (Taming `Git`osaurus Using Mystical Trees by Damini Satya Kammakomati | JSConf Budapest 2019)

  • 0 0
    林宜悉 發佈於 2021 年 01 月 14 日
影片單字