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

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


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

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-Запись-изменений-в-репозиторий - Запись изменений в репозиторий
https://youtu.be/zZBiln_2FhM - Git и GitHub Курс Для Новичков (Владилен Минин)


FAQ


Создать локальный проект и залить на github

$ mkdir project
$ cd project
$ git init
$ git remote add origin https://github.com/ura2404/project.git
$ git push -u origin master

клонировать

$ 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


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

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


it/github.1649750872.txt.gz · Последнее изменение: 2022/04/12 08:07 — ura2404