git-basic-tutorial

basic git tutorial

git commands

  1. git init - to initialize git reporsitory

  2. git clone - for clonning new repository

  3. git add filename | . (all) - to track untracked files

  4. git commit -m 'commit message' - to confirm your changes to git and will create copy of the changes with unique id

  5. git status - to check current status or changes in project or repository

  6. git branch branchname - to create new branch

  7. git branch - to list existing branches

  8. git checkout branchname - to move exsting branch to another branch

  9. git diff filename - to check difference between previous changes and current changes