0

I am trying to upload an Github project and idk how so I tried a video, but the result is:

enter image description here

That is:

PS C:\Users\BRQL\Documents\Github vscode> git.init
git.init: The term 'git.init' is not recognized as the name of a cmdlet, function, script file, or operable program. 
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At line:1 char:1
+ git.init
+
+~~~~~~~~~~
+ Category Info
~
: ObjectNotFound: (git.init:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Does this answer your question? ['git' is not recognized as an internal or external command](https://stackoverflow.com/questions/4492979/git-is-not-recognized-as-an-internal-or-external-command) – Markus Meyer Jun 06 '22 at 09:10

3 Answers3

2

The proper command is git init ., not git.init

The latter syntax is not recognized by git.


Note that is is best to git init ., meaning to initialize a new Git repository in the current local folder for a project folder.

Your current folder is Github vscode (from C:\Users\BRQL\Documents\Github vscode).
Unless your project is to develop VSCode itself, it is better to come up with an actual project name (here, for instance, "myProject"), and type instead:

git init myProject

That will create a C:\Users\BRQL\Documents\Github vscode\myProject in which you can start add/commit files.


As an alternative, you can also use (for local projects linked to a GitHub repository), the GitHub CLI gh command (after installation and authentication).
Specifically: gh repo create

mkdir myProject
cd myProject
# create a new remote repository and clone it locally
gh repo create myProject --public --clone
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
2

You need to install git first you can download from https://git-scm.com/downloads and

git .init

is not a git command.

git initializing commant is

git init

you can check the other commants of git from http://guides.beanstalkapp.com/version-control/common-git-commands.html

SHAHEEREZ
  • 58
  • 1
  • 9
-1

The easies way for a beginner to get a new Github project working on there local machine is to create it on Github first and then clone the repository with

git clone url-of-repo

You then get a working repository copy in a subdirectory with the name of the project (as given when created).

rioV8
  • 24,506
  • 3
  • 32
  • 49