Home > Mobile >  I have a Terminal problem in vscode how do i fix
I have a Terminal problem in vscode how do i fix

Time:06-07

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

CodePudding user response:

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

CodePudding user response:

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

CodePudding user response:

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

  • Related