Thursday 24 September 2015

Part 2 - git skim : Inspect your repository (status/log)

git status:
Displays current state of working and staging area.
git status

To display status in short format
git status --short

Ignore files:
One usually do not want to track .swp/.o/.exe files. To make git, ignore them, create .gitignore file and add following regex
*.swp
*.o
*.ext

git log:
Display committed snapshots. It lists project history, filters it and search for specific changes.

Display entire commit history.
git log

You can limit the number of commits to show
git log -n

Squeeze every commit to one line
git log --oneline

To see history of particular file, use following. Its easy way to see only those commits which modifies this file.
git log <file>

No comments:

Post a Comment