ГлавнаяКомпьютерUnix

Learning GIT - Lesson 4 - Creating Our First Repository + Basic UNIX Commands

Просмотров 12
Добавлено: 10 дней назад
Встроить видео
0%
Добавьте следующий код на свою страницу, чтобы встроить это видео:
<iframe src="http://tng.pw/embed/143134/" width="650" height="405" frameborder="0"></iframe> <br />
<a href="http://tng.pw//143134/">Learning GIT - Lesson 4 - Creating Our First Repository + Basic UNIX Commands</a>

Learning GIT - Lesson 4 - Creating Our First Repository + Basic UNIX Commands

To proceed with Git you will have to create a repository. You can either take an existing directory to create a Git repository in it, or you can create an empty directory.

To create a Git repository in tour current GIT directory we simply run init.
git init

To make a new directory that is a Git repository we just specify a directory.
git init newrep

For any of the above options, git init creates a .git subdirectory in the project directory, and this subdirectory contains all of the necessary metadata or settings for the repo.

UNIX commands that you need to know
ls - lists the contents of the current directory
ls -a lists all the contents of the currents directory including hidden files

cd changes directory
cd .. goes up one level
cd ../.. goes up two levels
cd - returns to the previous working directory