How to Add git into the existing project

September 20, 2019

by Yunus Shaikh

Here are the steps to connect existing git repository to local folder

  1. Create GIT repository on github, gitlab, bitbucket or any provider of your choice.
  2. Goto to your project folder and open it into terminal.
  3. Initialize existing local directory as a Git repository by this command.
    git init
  4. Add all of your files into git this stages them for the first commit.
    git add .
  5. Commit the files that you’ve staged in your local repository.
    git commit -m "Your commit message"
  6. Connect local folder to GIT url.
     git remote add origin remote {{repository URL}}
  7. Once its connected, you can push your code
     git push -u origin master


Featured Posts