A template for Python applications.
This template is different from most project templates in that this is intended to keep your project up to date with changes to the template by treating the template as another git branch.
Create a git repository with the
template
origin:git clone [email protected]:rouge8/python-template.git YOUR_PROJECT cd YOUR_PROJECT git remote rename origin template
Update the template with your project's details:
# Rename the application directory git mv src/python_template src/YOUR_PROJECT # Find and replace all instances of 'python-template' / 'python_template' # with 'your-project' / 'your_project' git grep python.template
Commit your changes and push them to your Git repository.
The strength of this approach to a template repository is that it makes keeping
up to date as easy as a git merge
and resolving any conflicts:
# Add the 'template' remote if necessary
git remote get-url template || git remote add template [email protected]:rouge8/python-template.git
# Fetch and merge the latest changes
git fetch template
git merge template/main
# Resolve any merge conflicts, run the tests, commit your changes, etc.