You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support adding projects as git worktrees and bare repositories.
Motivation
I like to keep my repositories checked out as git worktrees. Here's the common patterns I've seen people use
Checkout the main branch into <project_folder/main> and then use git worktree ../branch_name branch_name from inside main to check out other branch names
Checkout the repository as a bare repo, and checkout worktrees as subfolders of the bare repo.
Checkout the repository as a bare repo into a <project_dir>/.bare folder, and create worktrees inside the project folder.
We can have a discussion about which of these are the right approach, or if the meta tool should support all of these. But I'd be willing to adapt my workflow to which ever one meta adopts.
Example
git import --worktree --branches main, development <destFolder> [<childRepoUrl>]
Would result in a normal repo being cloned into <destFolder>/main (the first branch listed) and the remaining branches being added as git worktrees inside <destFolder>
git import --worktree --bare --branches main, development <destFolder> [<childRepoUrl>]
Would result in a bare repo being cloned into <destFolder> and the main and development branches being checked out as worktree folders inside <destFolder>
git import --worktree --bare --hidden --branches main, development <destFolder> [<childRepoUrl>]
Would result in a bare repo being checked out into <destFolder>/.bare and then the main and development branches being checked out as worktree folders inside <destFolder>
The text was updated successfully, but these errors were encountered:
🚀 Feature Proposal
Support adding projects as git worktrees and bare repositories.
Motivation
I like to keep my repositories checked out as git worktrees. Here's the common patterns I've seen people use
git worktree ../branch_name branch_name
from inside main to check out other branch names<project_dir>/.bare
folder, and create worktrees inside the project folder.We can have a discussion about which of these are the right approach, or if the meta tool should support all of these. But I'd be willing to adapt my workflow to which ever one meta adopts.
Example
git import --worktree --branches main, development <destFolder> [<childRepoUrl>]
Would result in a normal repo being cloned into
<destFolder>/main
(the first branch listed) and the remaining branches being added as git worktrees inside<destFolder>
git import --worktree --bare --branches main, development <destFolder> [<childRepoUrl>]
Would result in a bare repo being cloned into
<destFolder>
and the main and development branches being checked out as worktree folders inside<destFolder>
git import --worktree --bare --hidden --branches main, development <destFolder> [<childRepoUrl>]
Would result in a bare repo being checked out into
<destFolder>/.bare
and then the main and development branches being checked out as worktree folders inside<destFolder>
The text was updated successfully, but these errors were encountered: