title
Git Tutorial for Beginners: Command-Line Fundamentals
description
Git is the most popular version control system out there and for good reason. In this video, we'll go over the basics of what git is and how to use it within the command-line. There are several GUI tools out there to help you get started with git, but it can be extremely beneficial to learn git from the command-line as early as possible.
Some of the images used in this video are from the "Pro Git" book. These are licensed under creative-commons. You can find the book at:
https://git-scm.com/book/en/v2
✅ Support My Channel Through Patreon:
https://www.patreon.com/coreyms
✅ Become a Channel Member:
https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join
✅ One-Time Contribution Through PayPal:
https://goo.gl/649HFY
✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot
✅ Corey's Public Amazon Wishlist
http://a.co/inIyro1
✅ Equipment I Use and Books I Recommend:
https://www.amazon.com/shop/coreyschafer
▶️ You Can Find Me On:
My Website - http://coreyms.com/
My Second Channel - https://www.youtube.com/c/coreymschafer
Facebook - https://www.facebook.com/CoreyMSchafer
Twitter - https://twitter.com/CoreyMSchafer
Instagram - https://www.instagram.com/coreymschafer/
#Git
detail
{'title': 'Git Tutorial for Beginners: Command-Line Fundamentals', 'heatmap': [{'end': 589.236, 'start': 416.435, 'weight': 0.753}, {'end': 788.318, 'start': 750.15, 'weight': 0.787}, {'end': 1084.658, 'start': 989.227, 'weight': 0.722}, {'end': 1249.736, 'start': 1172.438, 'weight': 0.72}, {'end': 1397.565, 'start': 1337.276, 'weight': 0.772}, {'end': 1542.255, 'start': 1480.241, 'weight': 0.731}], 'summary': 'The tutorial covers git command line basics, understanding git as a distributed version control system, installation and basics, .gitignore and remote repository cloning, and git repository workflow including adding, pushing, merging, and deleting branches.', 'chapters': [{'end': 39.072, 'segs': [{'end': 39.072, 'src': 'embed', 'start': 0.169, 'weight': 0, 'content': [{'end': 5.736, 'text': "Hey, how's it going everybody? In this video, we're going to go over Git command line basics.", 'start': 0.169, 'duration': 5.567}, {'end': 13.386, 'text': "We're going to talk a little bit about what Git is, and then we're going to walk through how to get Git installed,", 'start': 6.297, 'duration': 7.089}, {'end': 17.431, 'text': 'and then the basic commands for working with local and remote repositories.', 'start': 13.386, 'duration': 4.045}, {'end': 26.78, 'text': "I'm going to use a couple of images in this walkthrough, and these images were taken from the ProGet book written by these two authors here,", 'start': 18.092, 'duration': 8.688}, {'end': 28.963, 'text': 'and it is licensed under the Creative Commons.', 'start': 26.78, 'duration': 2.183}, {'end': 39.072, 'text': 'If you want to read the book, which is a great resource, you can go to the Get website, click on the documentation, and the book is listed there.', 'start': 29.483, 'duration': 9.589}], 'summary': 'Video covers git command line basics, including installation and basic commands for local and remote repositories.', 'duration': 38.903, 'max_score': 0.169, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r4169.jpg'}], 'start': 0.169, 'title': 'Git command line basics', 'summary': 'Covers the basics of git command line, including the installation process and basic commands for working with local and remote repositories, using images from the proget book, a great resource available on the git website.', 'chapters': [{'end': 39.072, 'start': 0.169, 'title': 'Git command line basics', 'summary': 'Covers the basics of git command line, including the installation process and basic commands for working with local and remote repositories, using images from the proget book, a great resource available on the git website.', 'duration': 38.903, 'highlights': ['The chapter covers the basics of Git command line It includes the installation process and basic commands for working with local and remote repositories.', 'Uses images from the ProGet book as a great resource The images used in the walkthrough are taken from the ProGet book, which is a valuable resource available on the Git website.', 'Information about accessing the book on the Git website The book can be accessed on the Git website under the documentation section, providing readers with a valuable resource.']}], 'duration': 38.903, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r4169.jpg', 'highlights': ['The chapter covers the basics of Git command line It includes the installation process and basic commands for working with local and remote repositories.', 'Uses images from the ProGet book as a great resource The images used in the walkthrough are taken from the ProGet book, which is a valuable resource available on the Git website.', 'Information about accessing the book on the Git website The book can be accessed on the Git website under the documentation section, providing readers with a valuable resource.']}, {'end': 199.454, 'segs': [{'end': 83.372, 'src': 'embed', 'start': 39.873, 'weight': 0, 'content': [{'end': 42.954, 'text': 'So this video is going to be useful for three different types of people.', 'start': 39.873, 'duration': 3.081}, {'end': 46.536, 'text': 'First of all, somebody who has never used version control before.', 'start': 43.575, 'duration': 2.961}, {'end': 52.979, 'text': 'This is a great place to start because Git is the most widely used version control system out there.', 'start': 46.556, 'duration': 6.423}, {'end': 57.381, 'text': 'Second, for people who have used version control but not Git.', 'start': 53.86, 'duration': 3.521}, {'end': 65.125, 'text': "So if you're coming from a version control system like SVN, then it's going to be great to learn about Git also.", 'start': 57.461, 'duration': 7.664}, {'end': 73.228, 'text': 'And third, this will be useful for people who have used Git, but have mainly used the GUI visual tools.', 'start': 65.805, 'duration': 7.423}, {'end': 83.372, 'text': "So the GUI tools are really useful, but it's better to learn these command line tools from the very beginning, because the GUIs can only do so much,", 'start': 73.948, 'duration': 9.424}], 'summary': 'This video is beneficial for beginners in git, including those from other version control systems, and emphasizes the importance of learning command line tools.', 'duration': 43.499, 'max_score': 39.873, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r439873.jpg'}, {'end': 137.128, 'src': 'embed', 'start': 103.718, 'weight': 2, 'content': [{'end': 107.403, 'text': 'then what is the difference between central and distributed version control?', 'start': 103.718, 'duration': 3.685}, {'end': 111.549, 'text': 'Well, a central version control system is located in one place.', 'start': 108.104, 'duration': 3.445}, {'end': 117.233, 'text': 'So people can check out from the central location and make their changes and then check everything back in.', 'start': 111.989, 'duration': 5.244}, {'end': 123.157, 'text': "But this can be problematic if you can't get access to that central server or that central repository.", 'start': 117.773, 'duration': 5.384}, {'end': 128.862, 'text': "So, for example, if that server is offline or you're working somewhere that doesn't have a network connection,", 'start': 123.878, 'duration': 4.984}, {'end': 137.128, 'text': "then you'll only be able to see the files that you've checked out from that repository and no additional information about that central remote repository.", 'start': 128.862, 'duration': 8.266}], 'summary': 'Central version control is in one place; distributed allows offline access.', 'duration': 33.41, 'max_score': 103.718, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r4103718.jpg'}, {'end': 212.12, 'src': 'embed', 'start': 179.497, 'weight': 1, 'content': [{'end': 184.461, 'text': "So in a way, it's almost like every developer has an entire backup of the repository.", 'start': 179.497, 'duration': 4.964}, {'end': 193.949, 'text': 'So in the worst case scenario of something happening to the remote repository, every developer has a copy of that same repository on their machine.', 'start': 184.761, 'duration': 9.188}, {'end': 197.112, 'text': "So that's why it's called a distributed version control system.", 'start': 194.429, 'duration': 2.683}, {'end': 199.454, 'text': "So now let's go ahead and get started with Git.", 'start': 197.752, 'duration': 1.702}, {'end': 202.695, 'text': "Now, I'm not going to go into too much detail about the installation here.", 'start': 200.054, 'duration': 2.641}, {'end': 212.12, 'text': 'If you go to the website, which is git-scm.com, and then you go to the Downloads tab here,', 'start': 203.616, 'duration': 8.504}], 'summary': 'Git is a distributed version control system, providing every developer with a backup of the repository on their machine.', 'duration': 32.623, 'max_score': 179.497, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r4179497.jpg'}], 'start': 39.873, 'title': 'Understanding git', 'summary': 'Explains the benefits of git as a distributed version control system, suitable for beginners and experienced version control users, emphasizing its advantages over central version control systems and the importance of learning command line tools.', 'chapters': [{'end': 199.454, 'start': 39.873, 'title': 'Understanding git: key concepts and benefits', 'summary': 'Explains the benefits of git as a distributed version control system, suitable for beginners and experienced version control users, emphasizing its advantages over central version control systems and the importance of learning command line tools.', 'duration': 159.581, 'highlights': ['Git is the most widely used version control system, making it essential for those new to version control (quantifiable data: widely used).', 'Explaining the difference between central and distributed version control, emphasizing the benefits of a distributed system (key point: benefits of distributed system over central system).', 'Highlighting the importance of learning command line tools from the beginning, as GUI tools have limitations and may lead to situations where command line knowledge is crucial (key point: importance of command line knowledge).', "Illustrating the advantage of a distributed system by emphasizing that every developer has a local repository with the entire backup of the remote repository, ensuring data accessibility and reliability (quantifiable data: entire backup of the repository on each developer's machine)."]}], 'duration': 159.581, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r439873.jpg', 'highlights': ['Git is the most widely used version control system, essential for beginners (widely used).', "Illustrating the advantage of a distributed system with local repository backup (entire backup on each developer's machine).", 'Explaining the benefits of a distributed system over central version control (benefits of distributed system).', 'Highlighting the importance of learning command line tools from the beginning (importance of command line knowledge).']}, {'end': 529.356, 'segs': [{'end': 252.603, 'src': 'embed', 'start': 225.327, 'weight': 1, 'content': [{'end': 233.133, 'text': 'So first of all, after you git get installed, then you can check the version to make sure that it installed correctly.', 'start': 225.327, 'duration': 7.806}, {'end': 239.118, 'text': "So if you run this command here, git dash dash version, so I'm going to open up my terminal window here.", 'start': 233.193, 'duration': 5.925}, {'end': 248.68, 'text': 'Now, if I run git dash dash version and it pops up with some version here, here it says Git version 2.3.2,,', 'start': 239.799, 'duration': 8.881}, {'end': 252.603, 'text': 'then that means that Git is successfully installed.', 'start': 248.681, 'duration': 3.922}], 'summary': "After installing git, verify installation by running 'git --version' command. if the output shows 'git version 2.3.2', it is successfully installed.", 'duration': 27.276, 'max_score': 225.327, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r4225327.jpg'}, {'end': 307.928, 'src': 'embed', 'start': 275.41, 'weight': 0, 'content': [{'end': 279.751, 'text': 'So this is the syntax here to add these variables in here.', 'start': 275.41, 'duration': 4.341}, {'end': 293.275, 'text': 'So if I go back to my terminal and I can type git config dash dash global user.name and then in quotes I can type in my name here.', 'start': 280.011, 'duration': 13.264}, {'end': 298.9, 'text': "So I'll type in Corey Schaefer, hit enter, and now we can do the same thing for email.", 'start': 293.335, 'duration': 5.565}, {'end': 306.247, 'text': "So I'll type in user.email and then here I'll type in my email address at gmail.com.", 'start': 299.1, 'duration': 7.147}, {'end': 307.928, 'text': 'Hit enter.', 'start': 307.548, 'duration': 0.38}], 'summary': 'Configured global git user.name as corey schaefer and user.email as email@gmail.com', 'duration': 32.518, 'max_score': 275.41, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r4275410.jpg'}, {'end': 395.161, 'src': 'embed', 'start': 368.954, 'weight': 3, 'content': [{'end': 374.737, 'text': 'or the other syntax that you can do is git config, dash, dash help and read through there.', 'start': 368.954, 'duration': 5.783}, {'end': 376.837, 'text': 'And you can do this with any git action.', 'start': 374.757, 'duration': 2.08}, {'end': 380.318, 'text': 'So you git add dash dash help does the same thing.', 'start': 376.857, 'duration': 3.461}, {'end': 383.759, 'text': 'It takes you to the manual page for the add action.', 'start': 380.358, 'duration': 3.401}, {'end': 390.06, 'text': "So that's extremely useful once you start doing more intermediate and advanced things with git.", 'start': 384.299, 'duration': 5.761}, {'end': 395.161, 'text': "It's useful to look at those manuals and see exactly what you can do with them.", 'start': 390.86, 'duration': 4.301}], 'summary': "Use 'git config --help' to access manual pages and learn advanced git actions.", 'duration': 26.207, 'max_score': 368.954, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r4368954.jpg'}, {'end': 443.885, 'src': 'embed', 'start': 416.435, 'weight': 2, 'content': [{'end': 424.417, 'text': "So first let's take a look at that first example where you have a local code base that you wanna start tracking using Git.", 'start': 416.435, 'duration': 7.982}, {'end': 431.36, 'text': "So in order to do this, it's just as easy as running the git init command from within the directory in your terminal.", 'start': 425.057, 'duration': 6.303}, {'end': 434.401, 'text': 'So for example, let me pull up my terminal here.', 'start': 431.72, 'duration': 2.681}, {'end': 437.342, 'text': 'Now the code that I want to start tracking.', 'start': 434.861, 'duration': 2.481}, {'end': 443.885, 'text': 'if I do an ls within this directory, the code that I want to start tracking is within this local repo directory.', 'start': 437.342, 'duration': 6.543}], 'summary': "To track a local code base using git, run 'git init' within the directory in your terminal.", 'duration': 27.45, 'max_score': 416.435, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r4416435.jpg'}], 'start': 200.054, 'title': 'Git installation and basics', 'summary': 'Covers installation of git from git-scm.com, verifying the installation, and setting up global configuration variables. it also explains the syntax for getting help in git commands, common scenarios for beginning to use git, and the process of initializing a local code base for tracking using git.', 'chapters': [{'end': 345.211, 'start': 200.054, 'title': 'Git installation and configuration', 'summary': 'Covers the installation of git from git-scm.com, verifying the installation by checking the version, and setting up global configuration variables for user name and email address.', 'duration': 145.157, 'highlights': ["Installation of Git from git-scm.com and verifying the installation by checking the version. The installation process is explained by visiting git-scm.com and downloading the appropriate version for the operating system, followed by checking the correct installation using the command 'git --version'.", "Setting up global configuration variables for user name and email address to associate with check-ins and code changes. The process involves adding user name and email using 'git config --global user.name' and 'git config --global user.email' commands, followed by verifying the set values using 'git config --list'."]}, {'end': 529.356, 'start': 345.611, 'title': 'Git basics and common scenarios', 'summary': 'Explains the syntax for getting help in git commands, the two common scenarios for beginning to use git, and the process of initializing a local code base for tracking using git, emphasizing the importance of reading manuals and the ease of using git init command.', 'duration': 183.745, 'highlights': ['The chapter explains the syntax for getting help in Git commands, the two common scenarios for beginning to use Git, and the process of initializing a local code base for tracking using Git Provides an overview of the key topics covered in the chapter', 'Running the git init command initializes an empty Git repository for tracking the code, as demonstrated with the local repo directory containing .project and calc.py files Demonstrates the process of initializing a local code base for tracking using Git', 'Emphasizes the importance of reading manuals and understanding the available actions for more intermediate and advanced usage of Git Stresses the significance of reading manuals for understanding available actions in Git']}], 'duration': 329.302, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r4200054.jpg', 'highlights': ["Setting up global configuration variables for user name and email address using 'git config --global user.name' and 'git config --global user.email'", 'Installation of Git from git-scm.com and verifying the installation by checking the version', 'Running the git init command initializes an empty Git repository for tracking the code', 'Emphasizes the importance of reading manuals and understanding the available actions for more intermediate and advanced usage of Git', 'Explains the syntax for getting help in Git commands and the process of initializing a local code base for tracking using Git']}, {'end': 1063.005, 'segs': [{'end': 552.919, 'src': 'embed', 'start': 529.756, 'weight': 0, 'content': [{'end': 537.384, 'text': "Now this .project file is just a file that I created as an example of a file that we don't want in our repository for other people to see.", 'start': 529.756, 'duration': 7.628}, {'end': 543.791, 'text': "So there's a lot of files that contain personal preferences specific to our machine or our operating system.", 'start': 538.025, 'duration': 5.766}, {'end': 547.314, 'text': "that aren't actually part of the code that we want tracked.", 'start': 544.411, 'duration': 2.903}, {'end': 552.919, 'text': 'So, for example, say that I had my personal preferences within this dot project file.', 'start': 547.835, 'duration': 5.084}], 'summary': 'Excludes personal preference files like .project from repository.', 'duration': 23.163, 'max_score': 529.756, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r4529756.jpg'}, {'end': 607.962, 'src': 'embed', 'start': 575.426, 'weight': 2, 'content': [{'end': 577.869, 'text': 'And now let me go ahead and open this up in my text editor.', 'start': 575.426, 'duration': 2.443}, {'end': 589.236, 'text': 'Okay, so the gitignore file is just a simple text file where we can add files that we want git to ignore.', 'start': 580.413, 'duration': 8.823}, {'end': 591.517, 'text': 'And we can also use wildcards.', 'start': 589.816, 'duration': 1.701}, {'end': 602.74, 'text': 'So for example here in this slide, I have this star.pyc, which will ignore all files with a pyc extension.', 'start': 591.657, 'duration': 11.083}, {'end': 606.101, 'text': "So that's a Python example, but that's not important.", 'start': 603.18, 'duration': 2.921}, {'end': 607.962, 'text': "I'm just showing the concept here.", 'start': 606.201, 'duration': 1.761}], 'summary': 'Explaining the gitignore file for ignoring files in git, using wildcards; e.g. ignoring all .pyc files', 'duration': 32.536, 'max_score': 575.426, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r4575426.jpg'}, {'end': 659.085, 'src': 'embed', 'start': 634.296, 'weight': 3, 'content': [{'end': 641.377, 'text': 'and we want to commit the gitignore file because we want the repository to know to always ignore those files.', 'start': 634.296, 'duration': 7.081}, {'end': 646.599, 'text': "okay now, let's take a step back here and try to picture exactly where we are right now.", 'start': 641.377, 'duration': 5.222}, {'end': 651.24, 'text': 'Now, with Git, there are three states that we need to know about.', 'start': 647.338, 'duration': 3.902}, {'end': 655.643, 'text': "There's the working directory, the staging area, and the committed files.", 'start': 651.641, 'duration': 4.002}, {'end': 659.085, 'text': "And right now, we're currently in our working directory.", 'start': 656.103, 'duration': 2.982}], 'summary': 'Explaining git states: working directory, staging area, and committed files.', 'duration': 24.789, 'max_score': 634.296, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r4634296.jpg'}, {'end': 792.541, 'src': 'heatmap', 'start': 742.628, 'weight': 1, 'content': [{'end': 749.43, 'text': 'And then you can see that our gitignore file is in our staging area because we ran git add.gitignore.', 'start': 742.628, 'duration': 6.802}, {'end': 757.492, 'text': 'And like I said in the slide, if we want to add everything to the staging area, then we can just do git add dash capital A and hit enter.', 'start': 750.15, 'duration': 7.342}, {'end': 763.274, 'text': 'And now if I run git status, then you can see that all of our files are now in the staging area.', 'start': 758.112, 'duration': 5.162}, {'end': 768.959, 'text': 'So if we were to run git commit right now, then it would commit these changes to our repository.', 'start': 763.934, 'duration': 5.025}, {'end': 774.985, 'text': 'Now if you ever want to remove files from the staging area, then you can use the git reset command.', 'start': 769.56, 'duration': 5.425}, {'end': 787.057, 'text': 'So if I did git reset calc.py and then did a git status, you can see that the git ignore file is still in our changes to be committed,', 'start': 775.365, 'duration': 11.692}, {'end': 788.318, 'text': 'which is in the staging area.', 'start': 787.057, 'duration': 1.261}, {'end': 792.541, 'text': 'and our calc.py file is in the untracked files.', 'start': 789.118, 'duration': 3.423}], 'summary': "Using 'git add' stages files, 'git reset' removes from staging. 'git status' tracks changes.", 'duration': 49.913, 'max_score': 742.628, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r4742628.jpg'}, {'end': 1035.592, 'src': 'embed', 'start': 1012.432, 'weight': 4, 'content': [{'end': 1019.598, 'text': 'Now I set up this sample remote repository to be very similar to the example that we just used in the local directory.', 'start': 1012.432, 'duration': 7.166}, {'end': 1027.005, 'text': "So now that we've cloned that remote repository, now let's see how we can view information about that remote repository.", 'start': 1020.479, 'duration': 6.526}, {'end': 1030.207, 'text': 'So in order to do that, we can use a couple of commands.', 'start': 1027.645, 'duration': 2.562}, {'end': 1035.592, 'text': 'One of these commands is git remote dash v, and another is git branch dash a.', 'start': 1030.307, 'duration': 5.285}], 'summary': 'Setting up sample remote repository and viewing information using git commands.', 'duration': 23.16, 'max_score': 1012.432, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r41012432.jpg'}], 'start': 529.756, 'title': '.gitignore and remote repository cloning', 'summary': 'Explains the importance of .gitignore in excluding personal preference files from the repository, and demonstrates the process of creating and using .gitignore file to ignore specific files. additionally, it covers git basics including working directory, staging area, and committing files, and delves into cloning a remote repository using git clone and viewing remote repository information using git remote -v and git branch -a.', 'chapters': [{'end': 634.296, 'start': 529.756, 'title': 'Ignoring files with .gitignore', 'summary': 'Explains the importance of .gitignore in excluding personal preference files from the repository, and demonstrates the process of creating and using .gitignore file to ignore specific files, with an example of ignoring files with a pyc extension, resulting in the project file no longer appearing in the list of untracked files.', 'duration': 104.54, 'highlights': ['The chapter emphasizes the importance of .gitignore in excluding personal preference files from the repository, with the example of the dot project file containing personal preferences not meant to be tracked (e.g., machine or operating system specifics).', 'The process of creating and using .gitignore file to ignore specific files is demonstrated, including the creation of a .gitignore file and adding files to be ignored, resulting in the project file no longer appearing in the list of untracked files after saving the .gitignore file.', 'The use of wildcards in .gitignore file is explained, with the example of ignoring all files with a pyc extension using star.pyc, showcasing the flexibility to ignore specific file types with quantifiable results such as the project file being excluded from the untracked files list.']}, {'end': 1063.005, 'start': 634.296, 'title': 'Git basics and remote repository cloning', 'summary': 'Covers git basics including working directory, staging area, and committing files, demonstrating adding, committing, and removing files from the staging area and making the first commit, then delves into cloning a remote repository using git clone and viewing remote repository information using git remote -v and git branch -a.', 'duration': 428.709, 'highlights': ['The chapter covers the working directory, staging area, and committing files, demonstrating adding, committing, and removing files from the staging area and making the first commit. It explains the three states in Git: working directory, staging area, and committed files, and provides a detailed walkthrough of adding, committing, and removing files from the staging area, emphasizing the importance of detailed commit messages.', 'Demonstrates the process of cloning a remote repository using git clone and viewing remote repository information using git remote -v and git branch -a. It explains the process of cloning a remote repository using git clone and viewing remote repository information using git remote -v and git branch -a, providing a practical example and demonstrating how to list branches both locally and remotely.']}], 'duration': 533.249, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r4529756.jpg', 'highlights': ['The chapter emphasizes the importance of .gitignore in excluding personal preference files from the repository, with the example of the dot project file containing personal preferences not meant to be tracked (e.g., machine or operating system specifics).', 'The process of creating and using .gitignore file to ignore specific files is demonstrated, including the creation of a .gitignore file and adding files to be ignored, resulting in the project file no longer appearing in the list of untracked files after saving the .gitignore file.', 'The use of wildcards in .gitignore file is explained, with the example of ignoring all files with a pyc extension using star.pyc, showcasing the flexibility to ignore specific file types with quantifiable results such as the project file being excluded from the untracked files list.', 'The chapter covers the working directory, staging area, and committing files, demonstrating adding, committing, and removing files from the staging area and making the first commit. It explains the three states in Git: working directory, staging area, and committed files, and provides a detailed walkthrough of adding, committing, and removing files from the staging area, emphasizing the importance of detailed commit messages.', 'Demonstrates the process of cloning a remote repository using git clone and viewing remote repository information using git remote -v and git branch -a. It explains the process of cloning a remote repository using git clone and viewing remote repository information using git remote -v and git branch -a, providing a practical example and demonstrating how to list branches both locally and remotely.']}, {'end': 1827.806, 'segs': [{'end': 1117.887, 'src': 'embed', 'start': 1089.764, 'weight': 4, 'content': [{'end': 1092.747, 'text': "So I'll do return x times y and I'll save that.", 'start': 1089.764, 'duration': 2.983}, {'end': 1095.41, 'text': "So now we've made a change to our code.", 'start': 1093.368, 'duration': 2.042}, {'end': 1101.854, 'text': "So, now that we've made a change to our code, how are we going to push these changes to the remote repository?", 'start': 1095.89, 'duration': 5.964}, {'end': 1106.778, 'text': 'So first we need to commit these changes locally, just like we did before.', 'start': 1102.434, 'duration': 4.344}, {'end': 1113.283, 'text': 'So if I open up the terminal here, then the first thing I can do is git diff,', 'start': 1107.198, 'duration': 6.085}, {'end': 1117.887, 'text': 'and git diff is going to show me the changes that I have made to the code.', 'start': 1113.283, 'duration': 4.604}], 'summary': 'Code changes made, need to commit and push to remote repository.', 'duration': 28.123, 'max_score': 1089.764, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r41089764.jpg'}, {'end': 1249.736, 'src': 'heatmap', 'start': 1172.438, 'weight': 0.72, 'content': [{'end': 1177.362, 'text': "Now, whenever you're ready to commit those changes and push them to the remote repository,", 'start': 1172.438, 'duration': 4.924}, {'end': 1180.925, 'text': 'there are two things that you wanna do a git pull and a git push.', 'start': 1177.362, 'duration': 3.563}, {'end': 1185.129, 'text': 'Now people a lot of the times forget the git pull,', 'start': 1181.445, 'duration': 3.684}, {'end': 1192.054, 'text': "but you have to remember that we're now working on a project that could potentially have multiple developers,", 'start': 1185.129, 'duration': 6.925}, {'end': 1198.858, 'text': "and people have been pushing code to that remote repository while we've been working on our own features.", 'start': 1192.054, 'duration': 6.804}, {'end': 1207.444, 'text': 'So what the Git pull does is it will pull any changes that have been made since the last time that we pulled from that repository.', 'start': 1199.258, 'duration': 8.186}, {'end': 1211.865, 'text': 'And, as you can see, after we ran that pool, it said that we were already up to date,', 'start': 1208.004, 'duration': 3.861}, {'end': 1216.887, 'text': 'because there have been no changes to that remote repository since the last time that we pulled from it.', 'start': 1211.865, 'duration': 5.022}, {'end': 1222.109, 'text': "And now we're ready to push and we will do a get push.", 'start': 1217.567, 'duration': 4.542}, {'end': 1225.65, 'text': 'And this origin here is just the name of our remote repository.', 'start': 1222.669, 'duration': 2.981}, {'end': 1228.091, 'text': 'And then the master is the branch that we want to push to.', 'start': 1225.67, 'duration': 2.421}, {'end': 1237.473, 'text': 'So if we run that, then we have successfully pushed those changes that we just made to the master branch of that remote repository.', 'start': 1228.611, 'duration': 8.862}, {'end': 1241.994, 'text': "So, now that we've worked a little bit with local and remote repositories,", 'start': 1238.073, 'duration': 3.921}, {'end': 1249.736, 'text': "now let's go ahead and take a look at a common workflow that a lot of developers use when working with Git.", 'start': 1241.994, 'duration': 7.742}], 'summary': 'Remember to git pull before git push to sync with remote repository and avoid conflicts.', 'duration': 77.298, 'max_score': 1172.438, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r41172438.jpg'}, {'end': 1207.444, 'src': 'embed', 'start': 1177.362, 'weight': 0, 'content': [{'end': 1180.925, 'text': 'there are two things that you wanna do a git pull and a git push.', 'start': 1177.362, 'duration': 3.563}, {'end': 1185.129, 'text': 'Now people a lot of the times forget the git pull,', 'start': 1181.445, 'duration': 3.684}, {'end': 1192.054, 'text': "but you have to remember that we're now working on a project that could potentially have multiple developers,", 'start': 1185.129, 'duration': 6.925}, {'end': 1198.858, 'text': "and people have been pushing code to that remote repository while we've been working on our own features.", 'start': 1192.054, 'duration': 6.804}, {'end': 1207.444, 'text': 'So what the Git pull does is it will pull any changes that have been made since the last time that we pulled from that repository.', 'start': 1199.258, 'duration': 8.186}], 'summary': 'Remember to do a git pull to fetch changes from the remote repository, especially in a multi-developer project.', 'duration': 30.082, 'max_score': 1177.362, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r41177362.jpg'}, {'end': 1249.736, 'src': 'embed', 'start': 1222.669, 'weight': 1, 'content': [{'end': 1225.65, 'text': 'And this origin here is just the name of our remote repository.', 'start': 1222.669, 'duration': 2.981}, {'end': 1228.091, 'text': 'And then the master is the branch that we want to push to.', 'start': 1225.67, 'duration': 2.421}, {'end': 1237.473, 'text': 'So if we run that, then we have successfully pushed those changes that we just made to the master branch of that remote repository.', 'start': 1228.611, 'duration': 8.862}, {'end': 1241.994, 'text': "So, now that we've worked a little bit with local and remote repositories,", 'start': 1238.073, 'duration': 3.921}, {'end': 1249.736, 'text': "now let's go ahead and take a look at a common workflow that a lot of developers use when working with Git.", 'start': 1241.994, 'duration': 7.742}], 'summary': 'Successfully pushed changes to master branch of remote repository.', 'duration': 27.067, 'max_score': 1222.669, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r41222669.jpg'}, {'end': 1397.565, 'src': 'heatmap', 'start': 1337.276, 'weight': 0.772, 'content': [{'end': 1342.318, 'text': "And now that I've made those changes, now let's just commit this just like we have been doing.", 'start': 1337.276, 'duration': 5.042}, {'end': 1347.141, 'text': 'So if I do a git status, you can see that our calc.py file has been modified.', 'start': 1342.358, 'duration': 4.783}, {'end': 1352.203, 'text': 'I want to add those changes to our staging area using the git add command.', 'start': 1347.161, 'duration': 5.042}, {'end': 1360.267, 'text': "Then I want to do a git commit with a message of, we'll just call this divide func.", 'start': 1352.743, 'duration': 7.524}, {'end': 1369.313, 'text': 'well, divide function and now we have successfully committed this change to our local calc divide branch.', 'start': 1361.047, 'duration': 8.266}, {'end': 1375.397, 'text': "now this had no effect on our local master branch and it's had no effect on our remote repository.", 'start': 1369.313, 'duration': 6.084}, {'end': 1382.493, 'text': "So now let's say that we want to push this branch to our remote repository.", 'start': 1376.468, 'duration': 6.025}, {'end': 1390, 'text': 'So this is the syntax for doing that here this get push dash u origin, which is the name of our remote repository,', 'start': 1383.074, 'duration': 6.926}, {'end': 1391.602, 'text': 'and then the branch that we want to push to.', 'start': 1390, 'duration': 1.602}, {'end': 1397.565, 'text': 'Now I\'m not going to go too far into what that "-u does, since it\'s a basic git video,', 'start': 1392.242, 'duration': 5.323}], 'summary': 'Made changes, committed to local branch, and pushed to remote repository.', 'duration': 60.289, 'max_score': 1337.276, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r41337276.jpg'}, {'end': 1542.255, 'src': 'heatmap', 'start': 1480.241, 'weight': 0.731, 'content': [{'end': 1486.966, 'text': "But let's say that all of those unit tests and everything ran really well, and now we're ready to merge that branch with master.", 'start': 1480.241, 'duration': 6.725}, {'end': 1492.089, 'text': 'Now the way we want to do this is we want to check out our local master branch.', 'start': 1487.586, 'duration': 4.503}, {'end': 1495.331, 'text': "So we'll do git checkout master.", 'start': 1492.269, 'duration': 3.062}, {'end': 1497.812, 'text': 'You can see here that we switched to our master branch.', 'start': 1495.771, 'duration': 2.041}, {'end': 1500.374, 'text': 'Now we want to pull all the changes down.', 'start': 1498.392, 'duration': 1.982}, {'end': 1503.956, 'text': 'Remember, before we commit anything to master,', 'start': 1501.254, 'duration': 2.702}, {'end': 1509.379, 'text': 'we always want to pull down the changes in case any changes were made while we were working on our feature.', 'start': 1503.956, 'duration': 5.423}, {'end': 1512.02, 'text': "you can see here that it says that we're already up to date,", 'start': 1509.839, 'duration': 2.181}, {'end': 1523.026, 'text': "because nobody else has made changes to that remote branch since we've been working on the calc divide branch and now we can do this uh option on get branch here which is dash,", 'start': 1512.02, 'duration': 11.006}, {'end': 1529.03, 'text': "dash, merged and what that's going to tell us is the branches that we've merged in so far.", 'start': 1523.026, 'duration': 6.004}, {'end': 1535.673, 'text': "and you can see here that if i run, that calc divide doesn't pop up here because it hasn't been merged yet.", 'start': 1529.03, 'duration': 6.643}, {'end': 1542.255, 'text': 'So in order to merge that branch with master, you do a git merge and then the name of the branch.', 'start': 1536.293, 'duration': 5.962}], 'summary': 'Merge feature branch with master using git merge command.', 'duration': 62.014, 'max_score': 1480.241, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HVsySz-h9r4/pics/HVsySz-h9r41480241.jpg'}], 'start': 1063.566, 'title': 'Git repository workflow', 'summary': 'Details committing code changes to a remote repository using git, covering the process of working with local and remote repositories, including adding changes, creating and pushing branches, merging branches, and deleting branches. it also emphasizes the importance of git pull and git push, and provides a brief demonstration of creating and merging a branch for the subtract function.', 'chapters': [{'end': 1130.177, 'start': 1063.566, 'title': 'Committing code changes to remote repository', 'summary': 'Demonstrates how to make changes to the code base, commit the changes locally, and push them to the remote repository using git, emphasizing the process of reviewing the changes and executing the push command.', 'duration': 66.611, 'highlights': ["The process of committing code changes locally involves using the 'git diff' command to review the modifications made to the code, as demonstrated by comparing the removal of 'pass' with the addition of 'return x times y'.", "The demonstration includes making a simple change in the 'calc.py' file by modifying the 'multiply' function to return the desired result, showcasing a practical example of code modification.", 'The chapter covers the essential steps of pushing the committed changes to the remote repository, highlighting the importance of understanding and executing this crucial process in version control.', 'The discussion emphasizes the significance of understanding how to push the changes to the remote repository, indicating the importance of ensuring the changes are reflected in the centralized codebase.']}, {'end': 1827.806, 'start': 1130.557, 'title': 'Working with git: local and remote repositories', 'summary': 'Covers the process of working with local and remote repositories, including adding changes, creating and pushing branches, merging branches, and deleting branches, emphasizing the importance of git pull and git push. additionally, it provides a brief demonstration of creating and merging a branch for the subtract function.', 'duration': 697.249, 'highlights': ['The importance of git pull and git push Emphasizes the necessity of git pull to fetch changes from the remote repository and git push to push changes to the remote repository, crucial in a multi-developer project.', "Creating and pushing branches to remote repository Explains the process of creating a branch using 'git branch' and pushing it to the remote repository using 'git push -u origin