Git repository clone new or add to existing local project

GIT is an amazing code versioning tool. Well if you are new to GIT and wondering how to clone GIT repo locally to new folder or to the exising code folder.
Humm… Here are two methods, use according to your need.

Method1: Existing project

  • Step 1: Switch to your repository’s directory
    • cd /path/to/your/repo
  • Step 2: Connect your existing repository to Bitbucket
    • git remote add origin
    • git push -u origin master

Method2: Starting from scratch

  • git
  • cd testecho "# My project's README" >>
  • git add
  • git commit -m "Initial commit"
  • git push -u origin master

Thats it and you are good to go.

Author: Danyal
I'm skilled programmer with expertise in Vue.js/Nux.js for front-end development and PHP Laravel for back-end development. I excel in building APIs and services, and also have experience in web server setup & maintenance. My versatile skill set allows you to develop and maintain web applications effectively, from the user interface to the server-side functionality. I love coding with never ending learning attitude, thanks for visiting