Command: | Meaning: |
---|
which/whereis git | Shows where git pkg resides. |
git --version | Shows version |
git --help | Shows version |
git config --global user.name "Git Admin" | Set admin name (added to ~/.gitconfig) |
git config --global user.email "email@address" | Set admin name (added to ~/.gitconfig) |
git config --list | Shows info in ~/.gitconfig that you added (e.g., user.name and user.email. |
git diff | shows diff of files for which there is a diff between current version in folder and most recent push. |
git init | Creates .git folder in pwd |
git add . | filename | Add a file to the commit list. |
git commit | Commit add list (will open editor to add commit comment). |
git commit -m 'commit message here' | Commit add list |
git commit -a -m 'commit message here' | Commit add and commit at same time (with message in this case). |
git init | Creates .git folder in pwd |
git log filename | View the history of a file (optional). |
git status | Check the status of the project (indicates if anything awaits add/commit). |