Create a new repository on command Line

  1. git init
  2. git add fileName
    example:git add README.md
  3. git commit -m "first commit"
  4. git branch -M main
  5. git remote add origin (your git url)
  6. git push -u origin main
  7. git status
  8. git remote -v (crosscheck your in gitrepository or not)

Or push an existing repository from the command line

If you want to work on someone repository you can follow these steps

    In cmd go below commands

  1. git clone url
  2. git remote remove origin
  3. git add url
  4. or

  5. fork