Create a new feature branch named feature/$ARGUMENTS from the main branch.
Steps:
- •Ensure that $ARGUMENTS is provided. If not, print usage:
/git-feature <feature-name>and exit. - •Ensure there are no uncommitted changes. If there are uncommitted files, list them and recommend committing or stashing them before continuing.
- •Checkout the
mainbranch (git checkout main). - •Pull the latest changes from the remote (
git pull). - •Create and checkout the new feature branch (
git checkout -b feature/$ARGUMENTS). - •Push the new branch to the remote and set up tracking (
git push -u origin feature/$ARGUMENTS). - •Confirm the new branch was created and is active.