MyTetra Share
Делитесь знаниями!
Порядок работы с git
Время создания: 19.04.2017 18:13
Раздел: git - theory
Запись: xintrea/mytetra_db_mcold/master/base/149261469407i8fktgm5/text.html на raw.githubusercontent.com

### 1. Порядок работы с git


```sh

git init

git status

git add <file>

git commit -m "My first commit"

git log

```

### Добавление всех файлов

```git

git add .

```


git config

--

```sh

git config user.name "Jon Loeliger"

git config user.email "jdl@example.com"

```



git log

--

```sh

git log

```


Editor

--

```sh

export GIT_EDITOR=vim

```



help

--

```sh

git help --all

```



git -show

--

```sh

git show //commit id number//


git show-branch --more=10

//The phrase --more=10 reveals up to an additional 10 more versions, but only two exist

// so far and so both are shown.

```


Viewing Commit Differences

--

```sh

git diff 9da581d910c9c4ac93557ca4859e767f5caf5169 \ ec232cddfb94e0dfd5b5855af8ded7f5eb5c90d6

```


Remove file

--

```sh

git -rm poem.html

```


Rename a file

--

```sh

mv foo.html bar.html

```

Making a Copy of Your Repository

--

```sh

git clone public_html my_website

```

Так же в этом разделе:
 
MyTetra Share v.0.59
Яндекс индекс цитирования