From the course: CompTIA Linux+ (XK0-005) Cert Prep

Unlock the full course today

Join today to access over 24,300 courses taught by industry experts.

Create branches

Create branches

- [Instructor] Essential part about how Git and other revision control systems work is through branches. Be sure you're in your Git project one directory and type in git, space, branch and hit enter. Your current branch should be master. Let's create a new branch. I'm going to call it test config. Type in git, space, branch, space, testconfig and hit enter and verify again by typing in git, branch. You can see that the asterisk is next to master. This means that we're still using the master branch, not the new testconfig branch. To switch to the new testconfig branch, use the checkout command. Type in git, space, checkout, space, testconfig and hit enter. Now verify again by typing in git, branch. The current branch is now testconfig. Since there are no changes to the files, testconfig is exactly the same as master. Now let's edit ourfirstfile.txt. Type in vim, space ourfirstfile.txt and hit enter. Go into insert mode…

Contents