Git & Github Tutorial




first in local then remote :

  1. "git init" inside project main folder for making git directory in local system
  2. "git add ." to add all changes in staged area
  3. "git commit -m 'initial commit' " for commit the changes in main branch
  4. it's done in local , but for remote create new repo in github enter the name of project and should not check for Readme. then just ENTER.
  5. repo created , now write command in terminal "git remote add origin https://URL of created repo" for adding remote here.
  6. then "git push origin main" for pushing code remotely.

To remove git form a repo or dir of local system created with init

  1. open that folder, and show hidden files
  2. then delete .git folder
  3. check now its a git repo or not with git status.




















Comments

Popular Posts