Occasionally you are in the situation that you need to know which files were changed from a commit to commit either to check an issue or to deploy these changes. git diff --name-only SHA1 SHA2 git diff --name-only HEAD~10 HEAD~5 Source
Tag: Git
You can Add this code in your ~/.bashrc file to view the current branch in your project like function parse_git_branch () { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } RED="\[\033[0;31m\]" YELLOW="\[\033[0;33m\]" GREEN="\[\033[0;32m\]" NO_COLOR="\[\033[0m\]" PS1="$GREEN\u@\h$NO_COLOR:\w$YELLOW\$(parse_git_branch)$NO_COLOR\$ " Now your terminal will look like the following on a directory that … Continue reading Show which git branch you are using on terminal