Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 759 Bytes

README.md

File metadata and controls

26 lines (21 loc) · 759 Bytes

Using-Git

Differences between Windows and Linux/Ununtu

Windows

Use the Git Bash.

  • ls: list directories and files
  • cd: acces directories and files

Linux

Use the terminal directly

Setting Global Variables:

  • git config --global user.name "Your Name": set username
  • git config --global user.email "Your Email":set user email

Commmands

  • git init: Go to right directory first
  • git clone <URL>: clone a repository from a URL to this directory
  • git add <file>: add a file
  • git commit -m "Message": commit
  • git push origin master: push to remote repository
  • git pull origin master: pull from remote repository

Remotes

  • git remote -v: see the remotes
  • git remote add origin <URL>: set the origin remote