Skip to Content
Linux Administration Cookbook
book

Linux Administration Cookbook

by Adam K. Dean
December 2018
Beginner
826 pages
22h 54m
English
Packt Publishing
Content preview from Linux Administration Cookbook

How to do it...

Change into the example repository:

$ cd ~/example

Now, check that you're on master to start:

$ git branch* master
Your current branch is denoted with an asterisk. 

Good! Now, we're going to branch off from master, and make some changes:

$ git branch develop

Run git branch again:

$ git branch  develop* master

Note that now, we have two branches, but we're still on the master branch. We need to run a different command to flip to our new branch:

$ git checkout developSwitched to branch 'develop'

Now, list what's in this branch:

$ lsREADME

We've effectively made a copy of the master branch, meaning that all of the files committed to that branch are available in our new one.

Let's create a new file and give it some content:

$ echo ...
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

Practical Linux Security Cookbook - Second Edition

Practical Linux Security Cookbook - Second Edition

Tajinder Kalsi
Mastering Linux Administration

Mastering Linux Administration

Alexandru Calcatinge, Julian Balog

Publisher Resources

ISBN: 9781789342529Supplemental Content