Give Credits ⭐️ whoever deserves
Suppose, you are working on a project which uses the git tool for version management and it is a team project where you see multiple authors contributing the code.
You are assigned with a task and you took the help from one of the co-programmers to get it coded.
If you are really concerned about the help and want to credit the co-programmer then you can do that by making co-author-commit.
- Co-author Email
- Co-author’s commit to count as a contribution-use email associated with their Github account
- If co-author’s email is private, use their GitHub-provided no-reply email to protect their privacy.
settings > emails
Here no things are unknown to you. But, we are doing things differently.
Just like you do for a regular commit message and after adding the meaningful description you need to add two empty new lines instead of adding a closing quotation " .
git commit -m "New style of coding > >
On the next line of the commit message, type
Co-authored-by: author-name <firstname.lastname@example.org> with specific information for each co-author. After the co-author information, add a closing quotation mark.
Give each co-author their own line and Co-authored-by: commit trailer before closing quotation mark.
After adding your beautiful commit message, in the next push, the message appears with co-authors
Hope you like them. Thanks for reading…
Happy Coding !