Creating and Pushing Branches

Create a branch and push it to the remote repository.

We'll cover the following

In this section, you’re going to familiarise yourself with how branches are managed between the two and what exactly goes on in a push.

Setup

First, set up a simple origin Git repository and clone it like you did before.

1	mkdir -p lgthw_pushing
2	cd lgthw_pushing
3	mkdir git_origin
4	cd git_origin
5	git init
6	echo 'first commit' > file1
7	git add file1
8	git commit -am file1
9	cd ..
10	git clone git_origin git_clone

Get hands-on with 1200+ tech skills courses.