-3

where in cargo's set of base configurations can I tell cargo to create new projects with a VCS that isn't github?

want to do this 1 time, not on every "cargo new" and not via editing ea project config

hellow
  • 12,430
  • 7
  • 56
  • 79
bern
  • 13
  • 1
  • 1
    Please edit your question and make it readable, e.g. use punctuation. Also reduce your title to a short description instead of a sentence – hellow Nov 06 '18 at 08:17
  • 1
    Also when using tags, please ensure that you use the right tags. [tag:cargo] is a java library, you want to use [tag:rust-cargo]. By the way, please take [the tour](https://stackoverflow.com/tour) to learn how stackoverflow works. This seems to be your first question here and you should learn what SO is and how to use it. Also please read [how to ask](https://stackoverflow.com/help/how-to-ask) for a guide on how to ask good questions and avoid downvotes. – hellow Nov 06 '18 at 08:20
  • 1
    Btw. *'VCS that isn't github?*': github isn't a vcs, but [tag:git] is. You should learn [the different between github and git](https://stackoverflow.com/questions/13321556/difference-between-git-and-github). As I said, please edit your question asap. People will remove their downvotes and vote your question up if it contains a readable, good question and this is one, but not readable at the moment. – hellow Nov 06 '18 at 08:29

2 Answers2

2

The cargo config is described in the cargo book chapter 3.3.

By default cargo new will initialize a new Git repository. This key can be set to hg to create a Mercurial repository, or none to disable this behavior.

vcs = "none"

hellow
  • 12,430
  • 7
  • 56
  • 79
2

Adding details to hellow's answer, the file is ~/.cargo/config and you should create it if it doesn't exist already. Then add the following:

[cargo-new]
vcs = "none"              # VCS to use ('git', 'hg', 'pijul', 'fossil', 'none')
yyFred
  • 775
  • 9
  • 13