Git/init: Difference between revisions

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< Git
Created page with "{{fmt/title|git init}} '''Action''': Create an empty Git repository or reinitialize an existing one ==Links== ===Documentation=== * [https://git-scm.com/docs/git-init git-scm...."
 
No edit summary
 
Line 1: Line 1:
{{fmt/title|git init}}
{{fmt/title|git init}}
'''Action''': Create an empty Git repository or reinitialize an existing one
'''Action''': Create an empty Git repository or reinitialize an existing one
To be clear: to turn a bunch of files into a git repository, you do two things:
* <code>git init</code> -- that just kind of sets up the .git folder; it doesn't look at the files or do anything with them
* <code>[[Git/add|git add]] .</code> -- this tells git to go ahead and add the files to the repository.
...and then of course you can [[Git/commit|commit]] the files if you're ready to do any kind of transfer operations.
==Links==
==Links==
===Documentation===
===Documentation===
* [https://git-scm.com/docs/git-init git-scm.com]
* [https://git-scm.com/docs/git-init git-scm.com]

Latest revision as of 00:27, 6 August 2022

git init

{{#set: page title=git init }}

Action: Create an empty Git repository or reinitialize an existing one

To be clear: to turn a bunch of files into a git repository, you do two things:

  • git init -- that just kind of sets up the .git folder; it doesn't look at the files or do anything with them
  • git add . -- this tells git to go ahead and add the files to the repository.

...and then of course you can commit the files if you're ready to do any kind of transfer operations.

Documentation