git-feature
Manage Git feature branches
TLDR
Create and switch to a new feature branch
Merge a feature branch into the current branch creating a merge commit
Merge a feature branch into the current branch squashing the changes into one commit
Send changes from a specific feature branch to its remote counterpart
SYNOPSIS
git feature {start | finish | publish | switch} [options]
PARAMETERS
start
Creates a new feature branch named `feature_name` based on the main branch (e.g., `develop` or `main`).
Often automatically pushes it to origin.
finish
Merges the feature branch `feature_name` into the main branch (e.g., `develop`).
Often includes deletion of the local and remote feature branches.
publish
Pushes the feature branch `feature_name` to the remote repository.
This command makes the feature branch accessible to other team members.
switch
Switches the working directory to the existing feature branch `feature_name`.
DESCRIPTION
The `git-feature` command, often implemented as a shell script or alias leveraging core Git commands, aims to simplify the creation, management, and merging of feature branches. It abstracts away common multi-step Git operations into a single, convenient command. Typically, it offers functionalities like creating a new feature branch, publishing it, switching to it, merging it back into the main branch, and cleaning up remote and local copies after the merge.
While not a built-in Git command, `git-feature` promotes a clean and organized Git workflow by enforcing consistent naming conventions and providing safeguards against common mistakes. It reduces the cognitive load of remembering numerous Git commands and promotes efficiency in software development teams. The specific functionality and options depend on the particular implementation of `git-feature` being used.
CAVEATS
This is not a standard Git command. Its functionality and options vary depending on the specific implementation. Proper configuration and understanding of the underlying Git commands are crucial. Errors in the script can lead to data loss or repository corruption.
EXAMPLE WORKFLOW
1. `git feature start my-new-feature`: Create and switch to a new branch called my-new-feature.
2. Work on the feature, committing changes as needed.
3. `git feature publish my-new-feature`: Push the branch to the remote repository.
4. After review and approval, `git feature finish my-new-feature`: Merge into develop, delete local and remote branch.
SEE ALSO
git branch(1), git checkout(1), git merge(1), git push(1), git pull(1), git remote(1)