basic Git commands

  • git clone [url]
  • git add [filename]
  • git commit -m “Commit message”
  • git diff [first branch] [second branch]
  • git reset [file]
  • git status

use git cherry pick

  1. git show [commit hash]
  2. git cherry-pick [commit hash] -n or git cherry-pick [from commit hash]^..[to commit hash] -n
  3. git status
  4. git commit -m “`git log –oneline -n1 [commit hash]`”