17 Temmuz 2019 Çarşamba

git init seçeneği - Boş Yerel Depo Oluşturur

Git repository naming conventions
kebab-case kullanılır. Örneğin  order-service gibi

Kullanım
Boş ve yeni bir yerel depo oluşturur. Açıklaması şöyle.
This command creates an empty Git repository - basically a .git directory with subdirectories for objects, refs/heads, refs/tags, and template files. An initial HEAD file that references the HEAD of the master branch is also created.
Açıklaması şöyle
In order to initialize a local Git repository, you run the command “git init”. This creates a newly initialized repository on your local filesystem, creating a .git directory inside of your current working directory. The .git directory is a subdirectory of the root “working directory” and functions as the actual local repository, containing various config files, the object database, reference pointers for branches, and other scripts that can be run at various points in the projects lifecycle. 

Another important file is created once you make some changes to files, the Git index, located in .git/index. The Git index file is the staging area between the working directory and the local repository, staging specific changes within one or more files to be committed.
Açıklaması şöyle.
In git the default branch is master. When you commit git will "use" the current branch which you on right now. Since you have initialized a new repository you are on the "default" branch ...
Söz dizimi şöyle
git init [path to repository]
Şeklen şöyle


Path Vererek
Örnek
Şöyle yaparız
$ git init project
$ cd project
Path Vermeden
Örnek
Şöyle yaparız.
$ mkdir todelete
$ cd todelete
$ git init
Initialized empty Git repository in /u/u70021a/todelete/.git
$ git status
On branch master

No commits yet

nothing to commit (create/copy files and use "git add" to track)
Örnek
Şöyle yaparız.
$ git init
Initialized empty Git repository in ...
--bare seçeneği
Örnek
Şöyle yaparız.
git init --bare /path/to/myrepo.git

Hiç yorum yok:

Yorum Gönder