Search⌘ K

Two Git Repos: 'git_origin' and 'git_cloned'

Explore how to create and clone Git repositories, compare their differences, and understand the role of remotes like origin. Learn about fetch and push actions to manage changes between repositories effectively.

Creating a repository and cloning it

You’re going to start by creating a simple Git repository and then clone it:

1	mkdir -p lgthw_pull
2	cd lgthw_pull
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_cloned
Terminal 1
Terminal
Loading...

Similarities and differences

The two repositories (the folders: git_origin and git_cloned) contain identical content: ...