lu0 / git-worktree-wrapper Goto Github PK
View Code? Open in Web Editor NEWEffortlessly manage Git worktrees with `git checkout` and `git branch` commands, forget you are using git-worktree!
License: GNU General Public License v3.0
Effortlessly manage Git worktrees with `git checkout` and `git branch` commands, forget you are using git-worktree!
License: GNU General Public License v3.0
Describe the bug
Cannot checkout/switch to branches fetched from the remote, these branches were not created locally.
To Reproduce
Steps to reproduce the behavior:
new-from-remote/test
.git fetch --all
.git checkout new-from-remote/test
.fatal: this operation must be run in a work tree
master
:Branch 'new-from-remote/test' set up to track remote branch 'new-from-remote/test' from 'origin'.
Switched to a new branch 'new-from-remote/test'
master
).Expected behavior
After git checkout new-from-remote/test
the script should fetch new-from-remote/test
, create the new worktree in <repo's root dir>/new-from-remote.test
, and cd into it; even from the repo's root directory.
Desktop (please complete the following information):
Additional context
I think is a matter of looking for all existing local and remote references, but will need to parse only the names and not the remote specifiers (remote/heads/...
)
Use Python instead of bash to handle contexts.
Run built-in checkout/switch after each "wrapped" command to trigger post-checkout scripts.
When I want to create a new worktree, the script tries to create a new branch and fails if the branch exists (locally or in the remote).
Update the script to skip branch creation and fetch from the existing branch.
Describe the bug
Title
To Reproduce
Steps to reproduce the behavior:
git branch -d old_branch
or git branch -D old_branch
from git root or from the worktree directory.git checkout old_branch
re-creates the worktree directory with the files of the 'deleted' branch.Expected behavior
git checkout old_branch
should raise an error after such branch has been deleted.
Screenshots
N/A
Desktop (please complete the following information):
Additional context
git branch -d/-D old_branch
does indeed delete the worktree directory, but it's kept in the cache.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.