Difference between revisions of "Git/init"
< Git
Jump to navigation
Jump to search
(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....") |
|||
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
|
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 themgit 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.