How to Clone a Git Repository Into a Specific Folder?

clone a git repository into current folder

to clone a basic git repository we use below git clone command
git clone <clone_url>
in this command we are not specifiying where to clone the repository.
so it will clone the git repository into current folder that means it will create a directory called as your repository name in current folder and it will initialize the .git directory inside the directory and it will pull the all code from git repo and it will check the working copy of the latest version.

clone a Git repository into a specific folder

to clone a git repository into sepcific folder we use below command

here we are mentioning where to clone the repository. so it will clone the repository into that specified path.
that means it will do the same as mentioned in above basic git cloning, but not in current folder this time it will create a directory as repo name in your mentioned path.

Ex:

git clone https://github.com/decodingdevops/decodingdevops.git /home/devops/vijay

so it will clone a git repository into /home/devops/vijay path
after executing this command go into that folder and see the cloning repo with ls command
cd /home/devops/vijay
ls
here you can see your repo as directory go inside the repo directory and you can see all your repo files.