Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lecture materials
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marius Rixen
lecture materials
Commits
e1aa3f74
Verified
Commit
e1aa3f74
authored
1 year ago
by
Lukas Kluft
Browse files
Options
Downloads
Patches
Plain Diff
Add recommendations to best practices
parent
d661effa
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lectures/git/slides.qmd
+12
-11
12 additions, 11 deletions
lectures/git/slides.qmd
with
12 additions
and
11 deletions
lectures/git/slides.qmd
+
12
−
11
View file @
e1aa3f74
...
...
@@ -201,21 +201,22 @@ git branch
6. delete the new branch
# Best practices
(2 slides - Lukas/Georgiana)
- Keep commits as small as possible
- Use one branch per one functionality or bugfix
- Cleanup: delete branches after it was merged into `master`
Commits should deal with only one task, one logical unit
## Best practices - Naming convensions
* Commit **frequently**
* Commit each fix or task as a **separate** change
* Only commit **completed blocks** of work
- Use **meaningful** names for branches
- `feature_<short-desc>` for a new feature
- `bugfix_<short-desc>` for a bugfix
- Use **meaningful** commit message made of a title (max 50 chars) and a body containing a detailed explanation
# Best practices
Write **meaningful** commit messages
1. Use the **imperative mood** in the subject line (**what** is done)
1. **Limit** the subject line to 50 characters
1. Use the body to elaborate **why** changes have been
performed
## Best practices - Good Examples
TODO
# Remote repository & dkrz GitLab
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment