Git and GitHub Beginner Tutorial 4 - Enable git commands autocomplete and colors on Mac

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to this session on git and github today we are going to learn how can we enable the git command autocomplete feature on Mac and how can we enable the coloring of the commands in gate on a Mac OS so if you have seen in my last session if you are on Windows are you get a git bash while you are installing it and then get - we have all these features already enabled so I can do a I can type a command like GI T and I can type s dat and press tab on my keyboard and it will auto complete the command for me and you can also see there is this color coding where we can see all different kinds of colors on the git command ok if you are on Mac you might not get these features by default when you install git and today we will see how can we get these features on Mac so let us begin and let us start with autocomplete so for autocomplete step one will be you have to go to your terminal or I should say you have to put a get completion dot bash script to your home directory and to do that this is the direct command that you can use this is the command so what it is doing it is taking this a get completion bash script from this particular URL and it is putting it into our home directory so I will go to my terminal and just on this command I will copy this command go to my terminal and just run this command it will download it and put into your home directory and that's it and step two will be you have to add this particular thing to your bash profile so I will say add following to your dot bash profile and this tells dot bash to run get completion script good condition dot bash script if it exists okay so you can see it is saying that if the get completion dot bash script is exist then run it so you have to go to your terminal again just to this VI bash profile so I will do this on my terminal now and then you have to put this so what you will do is you will press I on your keyboard and you will go into the insert mode and now you can add anything on your on this particular file so you will copy and paste this particular script here and once you are done you will press escape and then : WQ and exclamations who I am saying that I have to write whatever changes I have done and then I have to quit and press Enter see I have already added this so it is already being shown here and then I will quit and now it is there in my bash profile so now this should complete your autocomplete so in case now if you can exit from this terminal and open a new session if you say get s dat and press tab it should autocomplete okay similarly if you say get st a and you press tab nothing will happen because in this case there are more than one commands in get that starts from sta in that case you can press tab two times and it will show you all the commands that start with sta and then you and choose s dat and then you press tab and it will autocomplete now this is very useful in handy because nobody can remember all the commands every time so autocomplete feature and getting all the options that you you can get from gate while you are doing the commands and you are writing your commands is very useful so this will be very handy feature for you right then let us see our for enabling colors in commands so step one is you have to check if it is already enabled check if coloring is already enabled so what we are going to do is you will say git config color and see now because autocomplete is there we can do our def to times and we can get all the options available with color so we want to check this color UI okay I hope you can see this color UI okay so we will say and you can see the value is false as of now right so we as we have said git config color UI and the value is false so we have to make it true so first you will do this to check what is the current value so for this you have to go to terminal and type this let us assume it is false for you as well now we have to enable coloring right so for that you will type the command git config - - global color dot UI true okay so this is the command that you will be you will have to type on your terminal I will write it down here as well and now if you again do this and check the value is true so now I will exit from here let me go to any of my git folder which is being tracked by gate and let me open the terminal there you can also go to terminal and then go to the location of that folder and now let me do git status and now you can see all the color coding has now enabled okay so this is how you can enable autocomplete and color coding in your Mac keep learning it hope you like it thank you
Info
Channel: Automation Step by Step
Views: 52,740
Rating: undefined out of 5
Keywords: git color, git autocomplete, autocomplete git commands, color git commands, git on mac, git, git hub, git and git hub, github, git and github, what is git, what is github, git beginner, github beginner, learn git and github, learn git, learn github, difference between git and github, git introduction, github introduction, git and github introduction, git basics, git and github basics, getting started with git, download git, git hub account
Id: VI07ouVS5FE
Channel Id: undefined
Length: 7min 22sec (442 seconds)
Published: Fri Oct 14 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.