Create Branch and Commit Changes
Analyse the uncommitted changes in the current working directory and create a well-named branch with an appropriate commit.
Instructions
-
Analyse uncommitted changes: Run
git statusandgit diffto identify all modified, added, and deleted files that are not yet committed. -
Understand the changes: Read the changed files to understand the purpose and scope of the modifications.
-
Determine a branch name: Based on the changes, create a descriptive branch name following this format:
feat/<description>- for new featuresfix/<description>- for bug fixesdocs/<description>- for documentation changesrefactor/<description>- for code refactoringchore/<description>- for maintenance tasks- Use kebab-case for the description (e.g.,
feat/add-user-authentication)
-
Create the branch: Create and checkout the new branch with
git checkout -b <branch-name>. -
Stage and commit: Stage all changes and create a commit using conventional commits format:
feat: <description>- for new featuresfix: <description>- for bug fixesdocs: <description>- for documentationrefactor: <description>- for refactoringchore: <description>- for maintenance- Include a meaningful commit body if the changes warrant additional explanation.
-
Report: Summarise what was done, including the branch name and commit message used.