GitBrancher streamlines your Git workflow by automating the process of stashing selected changes, creating a new branch from the mainline, and committing & pushing the changes to the remote repository—all with a single command.
- Selective Stashing: Pick the lines or blocks of code you want to refactor, right from within VS Code.
- Automated Branching: Create a new branch based on your mainline branch with a single command.
- Quick Push: Automatically commit your stashed changes and push them to your remote repository.
- Configurable: Customize your 'main' branch and 'origin' remote settings from within the VS Code settings pane.
- Open Visual Studio Code
- Go to Extensions or press
Ctrl+Shift+X
- Search for
GitBrancher
- Click Install
- Select the lines or blocks of code you want to stash.
- Open the command palette
Ctrl+Shift+P
and execute theGitBrancher: Push Selected Changes
command. - Follow the on-screen prompts to enter a new branch name and a commit message.
- Your selected changes will be committed to the new branch and pushed to your remote repository, all without disrupting your existing work.
To change the default settings, go to Settings > Extensions > GitBrancher
:
gitBrancher.mainBranch
: Set your mainline branch (default is "main").gitBrancher.remote
: Set your remote repository (default is "origin").
Contributions are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License