Инструменты пользователя

Инструменты сайта


it:github

Это старая версия документа!


github

https://github.com
https://git-scm.com/book/ru/v2 progit_v2.1.67.pdf - книга

http://lib.custis.ru/Линус_Торвальдс_о_GIT_на_Google_Talks – Линус Торвальдс про git


клонировать

$ git clone https://github.com/<USER>/<PROJECT>.git

клонировать в текущую папку

$ git clone https://github.com/<USER>/<PROJECT>.git .

проверить статус

$ git status

посмотреть изменения

$ git diff
$ git add .
$ git reset
$ git commit -m «Текст»
$ git tag vX.X.X
$ git push
$ gir push –tags

восстановить после случайного удаления

$ git reset –hard

удалить файл из индекса

$ git rm <file>

Proxy


Для больших файлов https://git-lfs.github.com/

$ sudo apt install git-lfs
$ git lfs track «*.psd»
$ git add .gitattributes

Если нет в пакете, то https://packagecloud.io/github/git-lfs

$ git lfs install

посмотреть файлы, обрабатываемые lfs

$ git lfs ls-files

удалить

git lfs uninstall

submodules
Инструменты Git - Подмодули mht

git submodule add https://github.com/<USER>/<PROJECT>.git <путь у паке назначения>

subtree
https://www.atlassian.com/git/tutorials/git-subtree


https://maxsite.org/page/how-to-put-your-project-on-github-com - Как выложить свой проект на GitHub.com
https://maxsite.org/page/github-private - Приватные репозитории GitHub для работы с клиентами
https://www.atlassian.com/git/tutorials/saving-changes/gitignore - про .gitignore
https://tyapk.ru/blog/post/gitignore - О файле .gitignore
https://git-scm.com/book/ru/v2/Appendix-C%3A-Команды-Git-Совместная-работа-и-обновление-проектов - Совместная работа и обновление проектов
https://git-scm.com/book/ru/v2/Основы-Git-Запись-изменений-в-репозиторий - Запись изменений в репозиторий


Отключение авторизации по паролю

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.

нужно сгенерировать токен, который будет вместо пароля
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token


Решения

Ошибка fatal: The remote end hung up unexpectedly при выполнении git push mht

git config http.postBuffer 262144000
// или
git config --global http.postBuffer 262144000
it/github.1647844921.txt.gz · Последнее изменение: 2022/03/21 06:42 — ura2404