Skip to Content
Mastering Vim
book

Mastering Vim

by Ruslan Osipov
November 2018
Beginner
330 pages
7h 21m
English
Packt Publishing
Content preview from Mastering Vim

Creating and merging branches

Separate branches are often used to create separate chunks of work. Once the feature is ready, the branches are merged back into the master (primary) branch. To create a new branch, run the following:

$ git checkout -b <branch-name>

For instance, we could create a branch in which we add a new animal type:

$ git checkout -b feature-leopard

It will appear as the following:

Now, you can perform work on this branch as usual. For instance, we could add a new animals/leopard.py and modify animal_farm.py just like we did in the previous section:

Now that our feature is ready (we've added the leopard), we're ready ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Vim

Mastering Vim

Damian Conway
Vim Masterclass

Vim Masterclass

Jason Cannon
Modern Vim

Modern Vim

Drew Neil

Publisher Resources

ISBN: 9781789341096Supplemental Content