Jump to: navigation, search

Common git commands.

Common Commands

  • used git clone uri
  • used git status
  • used git add
  • used git status --staged <=
  • git diff --cached <= staged so far see differences: git diff file
  • git commit <= to your local repository
  • git push origin master (push upstream if you have write access) <= origin ist remote repository, master ist der branch
  • git remote show origin <= look at info about upstream source
  • git diff origin master <= show difference between current commit and upstream
  • git remote add fork
  • git checkout master - switch to master or branch
  • git log document.tex - for logs
  • Roll back
git fetch origin
git reset --hard origin/master

Google Code


Difference between repositories

How do i fix merge conflicts in git