Last updated: 20211215 20220223 20220505
Personal public repositories: GitHub - kevinbowen777 GitLab - kevinbowen
-
Create local directory:
mkdir $REPOSITORY_NAME && cd $_
(not needed when usinggh
) -
Create repository:
a. Create repository from the cli (GitHub only):
- GitHub's cli tool with additional features https://cli.github.com
-
gh repo create
b. Create repository via web interface (GitHub & GitLab):
- GitLab: - Menu -> Create new project -> Create blank project
- GitHub:
- "Plus" Button -> New Repository
- Intialize this repository with:
- Leave all boxes unchecked
- Click
Create Repository
button
c. Add webhook for Discord notifications (GitHub only):
- Go to https://github.com/kevinbowen777/REPO_NAME/settings/hooks
- Payload URL:
<Add your webhook here>
- Content Type:
application/json
- Accept the rest of the defaults ClickAdd Webhook
button
- GitHub's cli tool with additional features https://cli.github.com
-
-
Initialize local repository (GitHub - use with web instructions & GitLab):
git init --initial-branch=master
git config --global user.name "Kevin Bowen"
git config --global user.email "kevin.bowen@gmail.com"
git remote add origin git@github.com:kevinbowen777/sampleproject.git
# git remote add origin git@gitlab.com:kevinbowen/sampleproject.git
# git remote remove origin
- Copy initial files into repo from last project (or
~/dotfiles/git
if available):
cp ../djangdo/.gitignore .
cp ../djangdo/LICENSE .
cp ../djangdo/README.md .
# black & isort configurations
cp ../djangdo/.pre-commit-config.yaml .
# project details & flake8 configuration (Be sure to update project information)
cp ../djangdo/setup.cfg
# black & isort configuration. Remove any other info from poetry/previous project
cp ../djangdo/pyproject.toml .
- Initial commit:
git add .
git commit -m "initial commit"
git push origin master
-
Create virtualenv:
mkvirtualenv $REPO_NAME
-
Initialize poetry:
poetry init
poetry add -D black
poetry add -D flake8
poetry add -D isort
poetry add -D pre-commit
- Initialize pre-commit:
pre-commit install