/etc/pathssudo nano /etc/path/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbinHomebrew добавляет ссылку на Git в папку /usr/local/bin поэтому сразу работает нормальный Git. В Catalina приходилось редактировать порядок каталогов. git restore :/git add . сразу всё и закоммитить первым делом. mysite
└── application
├── backend
└── frontend
└── .gitgit filter-repo --to-subdirectory-filter application/frontendmysite
└── application
├── backend
└── frontend
├── .git
└── application
└── frontendgit init
# добавить в .gitirnore /config/db.php
git add . # загнать остальные файлы под отслеживание
git commit
git remote add origin https://github.com/..........
# на рабочем компьютере удалить db.php из репозитория
# и никогда больше добавлять такие вещи в репо
git pull origin master # влить изменения с компа
# на этом этапе скорее всего вылезут конфликты
# сможете их разрешить прямо на сервере? а можно ли сделать так, чтобы при git clone папка /vendor на локалку сливалась, после чего убедить git перестать ее отслеживать?
git rm -r --cached -- 'vendor/*'
git commitgit reset --soft github/master
git commit -с
git push github -all # 1 -> 2
git rebase --onto master tmp1~2 tmp1 # пересадить два коммита ветки tmp1
git rebase --onto master tmp2~3 tmp2 # пересадить три коммита ветки tmp2
git reset HEAD~1 # обрезать ветку tmp2 на один коммит
# 1 -> 3
git rebase --onto master tmp1~3 tmp1# пересадить три коммита ветки tmp1
git switch master # вернуться в мастер
git reset tmp1~2 # и подвинуть его на шаг вперёд
git rebase --onto master tmp2~3 tmp2 # пересадить три коммита ветки tmp2 git update-index --assume-unchanged файл # create a repository interactively
gh repo create
# create a new remote repository and clone it locally
gh repo create my-project --public --clone
# create a remote repository from the current directory
gh repo create my-project --private --source=. --remote=upstream# create a repository under your account using the current directory name
$ glab repo create
# create a repository under a group using the current directory name
$ glab repo create --group glab-cli
# create a repository with a specific name
$ glab repo create my-project
# create a repository for a group
$ glab repo create glab-cli/my-project Грубо говоря на компе [папка1], а в репе лежит [папка1, папка2]
git reset --hard HEAD^
git push --force