Detailed changes
@@ -67,15 +67,14 @@ chmod +x ~/.local/bin/wt
```
wt c https://github.com/org/repo.git
# origin → upstream, your remotes added from config
-# Pushes default branch to ALL selected remotes (creates fork copies)
```
**Your own projects:**
```
wt c git@github.com:you/repo.git --own
-# First selected remote becomes origin (no push to it)
-# Pushes only to additional remotes (mirrors)
+# First selected remote becomes origin
+# Additional remotes added from config
```
### Adding worktrees
@@ -840,18 +840,16 @@ M.COMMAND_HELP = {
"Options:",
" --remote <name> Add configured remote from ~/.config/wt/config.lua",
" Can be specified multiple times",
- " --own Treat as your own project (see Push Behavior below)",
+ " --own Treat as your own project (see Remote Behavior below)",
"",
- "Push Behavior:",
+ "Remote Behavior:",
" Contributor mode (default):",
" - 'origin' renamed to 'upstream'",
" - Selected remotes added from config",
- " - Pushes default branch to ALL selected remotes (creates fork copies)",
"",
" Own mode (--own):",
" - 'origin' renamed to first selected remote",
" - Additional remotes added from config",
- " - Pushes only to ADDITIONAL remotes (mirrors), not the first",
"",
"Examples:",
" wt c https://github.com/user/repo.git",
@@ -1160,13 +1158,6 @@ function M.cmd_clone(args)
.. remote_name
.. "/*'"
)
- -- Push to additional remotes
- output, code = shell.run_cmd(
- "GIT_DIR=" .. git_dir .. " git push " .. remote_name .. " " .. default_branch
- )
- if code ~= 0 then
- io.stderr:write("warning: failed to push to " .. remote_name .. ": " .. output .. "\n")
- end
table.insert(configured_remotes, remote_name)
end
else
@@ -1196,7 +1187,7 @@ function M.cmd_clone(args)
table.insert(configured_remotes, "upstream")
end
- -- Add user's remotes and push to each
+ -- Add user's remotes
local remotes = global_config.remotes
for _, remote_name in ipairs(selected_remotes) do
if remotes then
@@ -1217,12 +1208,6 @@ function M.cmd_clone(args)
.. remote_name
.. "/*'"
)
- -- Push to this remote
- output, code =
- shell.run_cmd("GIT_DIR=" .. git_dir .. " git push " .. remote_name .. " " .. default_branch)
- if code ~= 0 then
- io.stderr:write("warning: failed to push to " .. remote_name .. ": " .. output .. "\n")
- end
table.insert(configured_remotes, remote_name)
end
else
@@ -193,13 +193,6 @@ function M.cmd_clone(args)
.. remote_name
.. "/*'"
)
- -- Push to additional remotes
- output, code = shell.run_cmd(
- "GIT_DIR=" .. git_dir .. " git push " .. remote_name .. " " .. default_branch
- )
- if code ~= 0 then
- io.stderr:write("warning: failed to push to " .. remote_name .. ": " .. output .. "\n")
- end
table.insert(configured_remotes, remote_name)
end
else
@@ -229,7 +222,7 @@ function M.cmd_clone(args)
table.insert(configured_remotes, "upstream")
end
- -- Add user's remotes and push to each
+ -- Add user's remotes
local remotes = global_config.remotes
for _, remote_name in ipairs(selected_remotes) do
if remotes then
@@ -250,12 +243,6 @@ function M.cmd_clone(args)
.. remote_name
.. "/*'"
)
- -- Push to this remote
- output, code =
- shell.run_cmd("GIT_DIR=" .. git_dir .. " git push " .. remote_name .. " " .. default_branch)
- if code ~= 0 then
- io.stderr:write("warning: failed to push to " .. remote_name .. ": " .. output .. "\n")
- end
table.insert(configured_remotes, remote_name)
end
else
@@ -38,18 +38,16 @@ M.COMMAND_HELP = {
"Options:",
" --remote <name> Add configured remote from ~/.config/wt/config.lua",
" Can be specified multiple times",
- " --own Treat as your own project (see Push Behavior below)",
+ " --own Treat as your own project (see Remote Behavior below)",
"",
- "Push Behavior:",
+ "Remote Behavior:",
" Contributor mode (default):",
" - 'origin' renamed to 'upstream'",
" - Selected remotes added from config",
- " - Pushes default branch to ALL selected remotes (creates fork copies)",
"",
" Own mode (--own):",
" - 'origin' renamed to first selected remote",
" - Additional remotes added from config",
- " - Pushes only to ADDITIONAL remotes (mirrors), not the first",
"",
"Examples:",
" wt c https://github.com/user/repo.git",