Categories
Basic

All about Git

  • Basic Git cmd
    • git init – initialises the current folder as a git repository
    • git status – current status of the folder
    • git add <file(s)/folder(s)> – commit the changes to the git repository
    • git commit -m <“message”>
    • git log <–oneline> – a brief log of commits
    • git checkout <commit> <file> – checkout the file from and older commit
    • git reset <file>
      • (with file) unstage a staged file, but leaving working directory unchanged
      • (without file) reset the staging area to the last commit without disturbing the working directory

Leave a comment