add emoji
This commit is contained in:
22
content/posts/2022/git/get-commit-hash.md
Normal file
22
content/posts/2022/git/get-commit-hash.md
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
title: "#️⃣ Git: Получить хэш коммита"
|
||||
date: 2022-09-19T22:28:56+03:00
|
||||
draft: false
|
||||
tags: [tips, git]
|
||||
---
|
||||
|
||||
### rev-parse
|
||||
|
||||
Команда `git rev-parse` возвращает хеш коммита для указанной ревизии.
|
||||
|
||||
Полное описание доступно на [git-scm.com](https://git-scm.com/docs/git-rev-parse).
|
||||
|
||||
Команда ниже вернёт хэш текущего коммита (**HEAD**).
|
||||
```sh
|
||||
git rev-parse HEAD
|
||||
```
|
||||
|
||||
А с параметром `--short` команда вернёт короткий хэш 😀.
|
||||
```sh
|
||||
git rev-parse --short HEAD
|
||||
```
|
23
content/posts/2022/git/remove-remote-branch.md
Normal file
23
content/posts/2022/git/remove-remote-branch.md
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
title: "➖ Git: Удалить ветку на сервере"
|
||||
date: 2022-09-16T03:48:34+03:00
|
||||
draft: false
|
||||
tags: [git, tips]
|
||||
---
|
||||
|
||||
Для удаления определённой ветки на сервере Git, необходимо выполнить команду:
|
||||
|
||||
```sh
|
||||
git push <remote_name> --delete <branch_name>
|
||||
```
|
||||
|
||||
Например:
|
||||
|
||||
```text
|
||||
git push origin --delete gh-pages
|
||||
|
||||
remote: . Processing 1 references
|
||||
remote: Processed 1 references in total
|
||||
To git.a2s.su:iiiypuk/minecraft-launcher.git
|
||||
- [deleted] gh-pages
|
||||
```
|
Reference in New Issue
Block a user