Git Commands

  1. Git Initialization – $ git init
  2. Git Clone – $ git clone <repository url>
  3. Git Clone From an branch – $ git clone -b <branch name> <repository url>
  4. For view branch – $ git branch , $git branch -a
  5. For checkout new branch – $ git checkout <branch name>
  6. for create and checkout new branch – $ git checkout -b <branch name>
  7. for file changes – $ git status
  8. Add file for commit – $ git add <file or folder name>
  9. Commit message – $ git commit -m “commit message”
  10. for pull code from repository – $ git pull <repository url or remote name like – origin / destination> <branch name>
  11. for push code from repository – $ git push <repository url or remote name like – origin / destination> <branch name>

Leave a Reply

Your email address will not be published. Required fields are marked *