Команды Git

git clone [githubUrl]

git branch

git checkout develop

git status

git add .

git commit -m "some text"

git push origin

git pull

git config --global user.name "someName"

git config --global user.email "someEmail"

git config credential.username "someName"

git rm --cached "somePath"


Branches = master + develop (collect feature & bugfix). Только master branch использовать для CI/CD.

Запись локальной ветки в удаленный репозиторий:
git push --set-upstream origin feature/database-connection
git push --set-upstream origin bugfix/database-connection

Удаление локальной ветки
git branch -d bugfix/database-connection

File .gitignore:aboutexamplegenerate
git add .gitignore
git commit -m "init: add file .gitignore" .gitignore

init: //указывает на начало работы над задачей или проектом
git commit -m "init: start task#57"
git commit -m "init: start sitemap section"

feat: //указывает на реализацию новой функциональности
git commit -m "feat: add banner for sitemap section"
git commit -m "feat: implement sitemap section"

fix: //указывает на исправление ошибки в ранее реализованной функциональности
git commit -m "fix: change banner size for sitemap section"
git commit -m "fix: implement correct banner size for sitemap section"

refactor: //указывает на форматирование кода (новая функциональность не добавлялась, поведение не изменялось)
git commit -m "refactor: change structure for sitemap section"
git commit -m "refactor: rename file html for sitemap section"

docs: //указывает на CRUD с документацией проекта
git commit -m "docs: update readme.txt >> add sitemap section info"
git commit -m "docs: add description on the sitemap page"