Log Creator is a simple and interactive Python tool designed to help you generate structured Git commit messages easily. It provides a user-friendly interface for writing comments, formatting them as lists, and generating the git commit
command with the provided comments.
- Interactive command-line interface.
- Supports structured comments with topics and subtopics.
- Generates Git commit commands with formatted messages.
- Provides helpful instructions and feedback.
-
Start the Program: When you run the program, it clears the terminal screen and welcomes you to Log Creator.
-
Instructions: The program provides instructions on how to write your comments and format them using hash (#) for topics and asterisk (*) for subtopics.
-
User Input: You can start writing your comments. When you are done, type
end
and press enter. If you choose to add a title to your commit, you will be prompted to write the title. -
Generate Git Commit Command: Once you have finished writing your comments, Log Creator generates the
git commit
command with the provided comments, structured as specified. -
Copy the Command: The generated Git commit command is displayed, and you can copy it to use in your Git workflow.
-
Clone the repository:
git clone https://github.com/hasssan-hasssan/GitLogCreator.git
-
Navigate to the project directory:
cd GitLogCreator
-
Run the script:
python LogCreator.py
-
Output:
[INFO] - Hello! Welcome to Log Creator. [INFO] - Write your comments and hit enter. When you're done, type 'end' and press enter. [INFO] - To format your message as a list, use the following structure: [INFO] - Use a hash [#] for topics and an asterisk [*] for subtopics. [INFO] - If you won't just write your message. [INFO] - Are you ready: (y|n) > y [INFO] - Great! Start writing your messages and remember to follow the structure. > #Added new features > *Some descriptions about feature > #Bug Fixed > *Fixed issue with validate something > end [INFO] - Do you want to add a title to this commit? (y|n) > y [INFO] - Write your title: > Working on a new feature [INFO] - Generating 'git commit' code, Please wait ... [INFO] - Here you go (just copy that): git commit -m "Title: Working on a new feature." -m "More details:" -m "- Added new features" -m " - Some descriptions about feature" -m "- Bug Fixed" -m " - Fixed issue with validate something"
-
Copy and paste command then hit enter.
git commit -m "Title: Working on a new feature." -m "More details:" -m "- Added new features" -m " - Some descriptions about feature" -m "- Bug Fixed" -m " - Fixed issue with validate something"
-
Run git log command:
> git log
-
Output:
commit 3e6f68b2d86b86a3ac36b533dcad05ed43409e58 (HEAD -> master) Author: ####################################################### Date: Fri Feb 5 18:00:00 2022 +0330 Title: Working on a new feature. More details: - Added new features - Some descriptions about feature - Bug Fixed - Fixed issue with validate something
Enjoy a more organized workflow by writing neat and structured commits. Happy coding!