hackelite01 / hacktoberfest-2024

14 stars 83 forks source link

Adding Rust Codes #29

Open Eyepatch-13 opened 1 week ago

Eyepatch-13 commented 1 week ago

I want to add rust codes to the project. However on using the default "cargo new" command, the tool creates a .git as well. How should I go about creating nested gits? Or should I commit excluding the .git?

hackelite01 commented 1 week ago

To add Rust code to the project without creating nested git repositories, follow these steps:

  1. Use cargo new to create your new Rust project.
  2. Delete the .git directory created by cargo new in the new Rust project.
  3. Add the new Rust project to your existing repository without including the .git directory.

This way, you avoid nested git repositories and keep everything under the main repository's version control.