0

I am trying to upload a Github project so I tried following 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
2

3 Answers 3

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
Sign up to request clarification or add additional context in comments.

Comments

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

Comments

-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).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.