🌐
Reddit
reddit.com › r/learnprogramming › how to git commit like a professional developer?
r/learnprogramming on Reddit: How to Git Commit like a professional Developer?
May 6, 2022 -

Hello Community,

I have a concern about the git commit. I don't know if I'm doing it correctly.

When I create HTML webpages, I'm used to committing every time I create a meaningful full small block. For JavaScript, I used to do it line per line.

But things have changed as I was introduced to pseudocode. And I'm confused when I have to commit the creation and "conversion" to JavaScript.

Here is an example of each of the steps I used to create a Rock Paper Scissors game:

STEP 1: Create Big Picture/Main algorithm

What I do is:

1 Create a folder called "algorithm" or "logic" 2 Create a file BIG_PICTURE where I briefly define what my code will do.

-> Big_Picture

Each line I create will be a "sub-algorithm". The Uppercase name at the end represents the name of the sub-algorithm I will work on with pseudocode.

Commit: I commit BIG_PICTURE after I fully create it. Then I commit it with the message "Create BIG_PICTURE basic algorithm"

Questions:

  • Should I rather commit line per line?

  • Is my commit message correct?

STEP 2: Create sub-algorithm

Then I repeat the same process with each sub-algorithm. However, I define in greater detail each step.

-> PLAY_ROUND

Commit: Then when all the algorithm is created, I commit the message "Create PLAY_ROUND basic algorithm"

Questions:

  • Should I rather commit line per line?

  • Is my commit message correct?

Edit algorithm

If I find out that my algorithm/sub-algorithm is wrong (ex: I forgot to create a step). I revise the pseudocode and I change what is needed.

Commit: I commit with the message "Fix PLAY_ROUND algorithm: print 'have a nice day' before if statement in ln 6"

Questions:

  • Is my commit message correct?

  • How can I improve it?

Convert algorithm to code

Once my algorithm is clear, I copy it to app.js as a comment. Then I convert each line of pseudocode to JavaScript code like this:

-> Pseudocode to JavaScript

Because my algorithm was previously defined, I don't feel the need to commit line per line. I rather convert all the pseudocode and commit it once, as I feel more comfortable doing so.

Commit: I commit with the message "Convert PLAY_ROUND algorithm to JavaScript code".

Questions:

  • Should I rather commit line per line?

  • Is my commit message correct?

  • How can I improve the commit message?

Thank you in advance for your feedback 😃

Top answer
1 of 13
29
Committing line by line is insanity, commit functional and meaningful chunks of code. I'd skip committing all that pseudocode altogether, unless it somehow adds value to the actual functional code. Seems like something you should probably use as your own notes/helper whatever to help you, not something that should be in repo. Your messages aren't especially good. Give a high level summary of changes and what they do. Don't go into details, for example you don't need to specify play_round algorithm, everyone can see from the commit that play_round thing was added, and although it's quite clear in this case what it does, your commit message should explain what the changes actually do in human language. You write commit messages for people. Line number and "before if statement" and such are not needed and are actually harmful rather than helpful, when code gets added or removed, it's no longer line 6 nor necessarily before if statement. Saying you converted something into javascript doesn't again tell anything what the changes actually do, what can you do with the software that you previously couldn't do etc. All in all remove most if not all low level technical descriptions. Describe in human readable sentences what the change does, how it affects the program. Maybe in more complex cases give an explanation why the changes was made etc.
2 of 13
11
Don't worry, in the end your commits will end up like "Fix typo" "Revert fix" "Maybe now" "One more try" "Asdadfs" Sincerely, Professional Developer
🌐
Atlassian
atlassian.com › git › tutorials › saving changes › git commit
Git Commit | Atlassian Git Tutorial
December 15, 2025 - This changes the basic development model for Git users. Instead of making a change and committing it directly to the central repo, Git developers have the opportunity to accumulate commits in their local repo.
Discussions

How do people feel about making code edits via web browser
🌐 r/github
8
3
June 23, 2023
How to Git Commit like a professional Developer?
Committing line by line is insanity, commit functional and meaningful chunks of code. I'd skip committing all that pseudocode altogether, unless it somehow adds value to the actual functional code. Seems like something you should probably use as your own notes/helper whatever to help you, not something that should be in repo. Your messages aren't especially good. Give a high level summary of changes and what they do. Don't go into details, for example you don't need to specify play_round algorithm, everyone can see from the commit that play_round thing was added, and although it's quite clear in this case what it does, your commit message should explain what the changes actually do in human language. You write commit messages for people. Line number and "before if statement" and such are not needed and are actually harmful rather than helpful, when code gets added or removed, it's no longer line 6 nor necessarily before if statement. Saying you converted something into javascript doesn't again tell anything what the changes actually do, what can you do with the software that you previously couldn't do etc. All in all remove most if not all low level technical descriptions. Describe in human readable sentences what the change does, how it affects the program. Maybe in more complex cases give an explanation why the changes was made etc. More on reddit.com
🌐 r/learnprogramming
24
17
May 6, 2022
Commit and Branch Name Generator for Git (with Emoji Support)

Well, in my opinion this doesn't solve any real issue anybody has, but only potentially create bad commit messages. Also I had to read through the readme 3 times and I still don't really know what it does and how it does what you say it does.

But it seems to not be anything for git, but only for github specifically because it uses an issue number?

Also I think you're overdoing it with the emojis, but maybe I'm just too old for that.

More on reddit.com
🌐 r/git
8
8
December 8, 2020
I just got my GitHub contribution wall art from codeprints.dev!
Hey all, just wanna share this with you. Two friends of mine have built a small service https://codeprints.dev/ where your GitHub timeline will be printed, framed, and shipped to you. I was one of the alpha testers of their service to find the first bugs. I was not expecting an order was placed at all during testing, however, the result is great (as you can see in the picture). The best thing: The image is hanging in my office and reminds me daily to consume less and create more. A kind of motivational boost. More on reddit.com
🌐 r/github
18
417
January 12, 2021
People also ask

How should I structure a Git commit message?

Git commit messages follow a three-part structure: subject line, body, and footer. The subject line is a one-line summary that appears in logs. Add a blank line, then use the body to explain context and reasoning when needed. The footer is optional and used for referencing issues or marking breaking changes.

🌐
datacamp.com
datacamp.com › home › tutorials › git › git commit message: the rules, examples, and conventions
Git Commit Message: The Rules, Examples, and Conventions | DataCamp
What makes a good Git commit message?

A good Git commit message has a clear, descriptive subject line under 50 characters that explains what changed. It uses imperative mood (like "add feature" not "added feature") and includes a body when you need to explain why you made the change. The message should help future readers understand your intent without having to dig through the code.

🌐
datacamp.com
datacamp.com › home › tutorials › git › git commit message: the rules, examples, and conventions
Git Commit Message: The Rules, Examples, and Conventions | DataCamp
What are common Git commit message mistakes?

The most common mistakes are vague messages like "fix bug" that tell readers nothing, mixing unrelated changes in one commit, and leaving work-in-progress messages like "WIP" or "temp fix" in the final history. These mistakes make your Git history harder to search and understand. Each commit should contain one logical change with a clear, specific message.

🌐
datacamp.com
datacamp.com › home › tutorials › git › git commit message: the rules, examples, and conventions
Git Commit Message: The Rules, Examples, and Conventions | DataCamp
🌐
GitHub
github.com › git-guides › git-commit
Git Guides - git commit · GitHub
Commits are created on the branch that you've currently checked out to (wherever HEAD is pointing) so it's always a good idea to run git status before making a commit, to check that you're checked out to the branch that you intend to be.
🌐
DEV Community
dev.to › mishmanners › how-to-make-a-good-git-commit-1ed7
How to make a good `git commit` - DEV Community
October 5, 2021 - There's lots of great examples out there. Chris Beams for example has a great article on how to write a commit message. Beams says to keep in mind rules such as separating the subject and body, and explaining what the commit is about.
🌐
DEV Community
dev.to › ceceliacreates › how-to-make-and-commit-changes-in-a-project-from-github-1g12
How to make and commit changes in a project from GitHub - DEV Community
December 28, 2020 - By using the -m flag we can pass a message via the command line. If you prefer to use a text editor to write a longer commit message, you can just run git commit and it will prompt a text editor to open.
🌐
GitHub
github.com › NurTheDev › commit-guide
GitHub - NurTheDev/commit-guide: Commit Message Guide — A quick reference for writing clean, professional Git commit messages. Includes common commit types (feat, fix, refactor, style, docs, test, chore, wip) and examples for MERN stack developers to keep commit history organized and meaningful. · GitHub
Commits might look like: feat: create product upload form UI feat: connect form to backend API fix: image upload not saving to Cloudinary refactor: extract image upload logic to utils style: improve form spacing and button color docs: add usage ...
🌐
DataCamp
datacamp.com › home › tutorials › git › git commit message: the rules, examples, and conventions
Git Commit Message: The Rules, Examples, and Conventions | DataCamp
January 27, 2026 - Examples: refactor: extract validation logic into separate module or chore: update pandas to 3.0.0. Pick whichever type best describes your change and move on - consistency matters more than picking the "perfect" label. Here's a checklist of rules that'll make your commit messages more useful. Keep the subject line under 50 characters. This guarantees it displays properly in git log --oneline, GitHub's commit list, and terminal output without truncation.
Find elsewhere
🌐
GitHub
github.com › github › dev
GitHub - github/dev: Press the . key on any repo · GitHub
March 18, 2025 - There are two ways to go directly ... Swap .com with .dev in the URL. For example, this repo https://github.com/github/dev becomes http://github.dev/github/dev...
🌐
W3Schools
w3schools.com › git › git_commit.asp
Git Commit
You can skip the staging step for already tracked files with git commit -a -m "message".
🌐
DEV Community
dev.to › ritikbanger › how-to-write-git-commit-messages-like-a-pro-dn
How to write Git commit messages like a Pro! - DEV Community
October 11, 2022 - The title (first line) should be as you say, short and concise about what the commit does. But the commit body should contain more detailed reasons why. Explain the original bug or give an example on how to use the new feature.
🌐
GitHub
gist.github.com › turbo › efb8d57c145e00dc38907f9526b60f17
Git Commit Message Standard · GitHub
Commit messages must have a subject line and may have body copy. These must be separated by a blank line. ... The body copy must only contain explanations as to what and why, never how. The latter belongs in documentation and implementation. This is an example of a complete commit message that adheres to this standard.
🌐
DEV Community
dev.to › helderberto › patterns-for-writing-better-git-commit-messages-4ba0
Patterns for writing better git commit messages - DEV Community
November 11, 2024 - Adding examples will be good to see. ... Begin fixes with "Fix" and include ticket number if possible - Fix #234: User cannot log in with email · If pausing the work today and planning to continue tomorrow, start with [WIP] (Work-In-Progress) - [WIP] improving the login process · Begin temporary commits (usually for testing out something) with [TEMP] - [TEMP] add a temporary logout button
🌐
DEV Community
dev.to › akkaraponph › git-commit-message-format-4h00
Git - Commit Message Format - DEV Community
September 6, 2026 - Footer The footer should contain any information about Breaking Changes and is also the place to reference GitHub issues that this commit Closes. Breaking Changes should start with the word BREAKING CHANGE: with a space or two newlines.
🌐
Axolo Blog
axolo.co › blog › p › git-commit-messages-best-practices-examples
Git Commit Message Template: Best Practices and Examples | Axolo Blog
July 3, 2024 - Use the following examples to craft clear and effective Git commit messages for various scenarios: # GITHUB COMMIT MESSAGE TEMPLATE EXAMPLES ## Commit message with description and breaking change footer feat: allow provided config object to extend other configs BREAKING CHANGE: 'extends' key in config file is now used for extending other config files.
🌐
Git
git-scm.com › docs › git-commit
Git - git-commit Documentation
Specify a (<token>, <value>) pair that should be applied as a trailer. (e.g. git commit --trailer "Signed-off-by:C O Mitter \ <committer@example.com>" --trailer "Helped-by:C O Mitter \ <committer@example.com>" will add the Signed-off-by trailer and the Helped-by trailer to the commit message.)
🌐
DEV Community
dev.to › unique-tea › your-first-commit-a-beginners-journey-with-git-and-github-ndd
Your First Commit: A Beginner’s Journey with Git and GitHub - DEV Community
December 21, 2024 - Git and GitHub are two crucial tools for contemporary software development that are explained in this article for both novice and seasoned engineers. Git is a distributed version control system that monitors codebase changes, facilitating effective code history management and collaboration.
🌐
DEV Community
dev.to › eclecticcoding › git-commit-48f1
GIT Commit - DEV Community
April 23, 2020 - Commit changes to your local branch and push to your repository. Go to your repository on GitHub and create a pull request. These are only the basics. The GitHub tutorial mentioned above is a good interactive example to get you use to the process. Also, I use a CONTRIBUTING document on most ...
🌐
DEV Community
dev.to › mrshawnhum › git-commit-message-simply-explained-162g
Simply Explained: Git Commit Message - DEV Community
August 1, 2020 - Commit messages are not difficult to make. Using the three ingredients, You can make excellent commit messages that are clean and easily understandable. Below is an example of a good commit.👇
🌐
GitHub
gist.github.com › joshbuchea › 6f47e86d2510bce28f8e7f42ae84c716
Semantic Commit Messages · GitHub
Hi friends, if I make some changes ... pom.xml, build.gradle etc) to reflect my release version, what would be the commit message for it. For example, I have a PHP composer package that I develop and maintain....