Black Mamba

Faster, Higher, Stronger.

How to Add Stuff on GitHub via Command Line

  • Register an “username” and login in GitHub
  • Click “+” sign at the upper right corner to create a new repository and give it a name
  • Open your repository and you can see the clone URL is located at the right side, for instance: https://github.com/yourname/yourRepositoryName.git
  • Copy the URL of your repository and clone it from remote to local by typing: git clone https://github.com/yourname/yourRepositoryName.git
  • See the current configured remote repository for your fork by typing: git remote -v
  • Add something to the local repository, such as a “README.md” file
  • Push the new added file “README.md” to the remote version on GitHub by typing:
  • Typing your username and password to submit the changes to your repository on GitHub
  • Now you can refresh the web page of your repository to see the “README.md” file that just added
  • For removing the file/document named “sometingToRemove” of your local repository:
    • git rm sometingToRemove

Comments