If you want to use Git on the shell you need to know how this command works.
The git command providesa set of high-level operations and full access to internals.
Here is the basic syntax but commands may become some more complicated:
git [flags] [path]

Start a working environment

  • clone: is used to clone a repository in a new directory.
  • init: this onw is used to create an empty Git repository or reinitialize an existing one.

Work on the current changes

  • add: add a file contents to the index.
  • mv: move or renamea file, directory or a symlink (a symbolic link).
  • rm: remove files from the working tree and from the index.
  • format-patch id: create a file patch
  • am: apply a patch file

History and state

  • log: show commit logs.
  • status: show the working tree status.

Managing modification

  • commit: record changes to the repository.
  • diff: show changes between commits.
  • merge: merge two or more development histories together.
  • pull: fetch from and update your local directory with the repository.
  • push: update the remote repository with your changes.