mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 02:48:17 +00:00
Initialize a Git repository in uv init
(#5476)
## Summary Similiar to `cargo init --vcs <VCS>`, this PR adds the `--vcs <VCS>` flag for `uv init`, allowing to create a version control system during initialization. By default, `uv init` will create a Git repository if the `--vcs` flag is not provided. Use `--vcs none` to disable this feature. Currently, only Git is supported. While Cargo also supports hg, pijul, and fossil, this initial PR only includes Git. We can add more later if there are any user requests. --------- Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
This commit is contained in:
parent
4ba0e56754
commit
0c801f8f4b
10 changed files with 346 additions and 2 deletions
|
@ -558,6 +558,17 @@ uv init [OPTIONS] [PATH]
|
|||
|
||||
<p>By default, adds a requirement on the system Python version; use <code>--python</code> to specify an alternative Python version requirement.</p>
|
||||
|
||||
</dd><dt><code>--vcs</code> <i>vcs</i></dt><dd><p>Initialize a version control system for the project.</p>
|
||||
|
||||
<p>By default, uv will initialize a Git repository (<code>git</code>). Use <code>--vcs none</code> to explicitly avoid initializing a version control system.</p>
|
||||
|
||||
<p>Possible values:</p>
|
||||
|
||||
<ul>
|
||||
<li><code>git</code>: Use Git for version control</li>
|
||||
|
||||
<li><code>none</code>: Do not use any version control system</li>
|
||||
</ul>
|
||||
</dd><dt><code>--verbose</code>, <code>-v</code></dt><dd><p>Use verbose output.</p>
|
||||
|
||||
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue