Working from git command line, you want to check the commited but unpsuhed files. You can use below command:
git log origin/<branch_name>..HEAD
Replace <branch_name> with you feature branch name or the current branch name you are working with.To create a alias inside you unix shell, you can put this alias inside your .profile or .bashrc file:
alias git-unpushed = !GIT_CURRENT_BRANCH=$(git name-rev --name-only HEAD); git log origin/$GIT_CURRENT_BRANCH..$GIT_CURRENT_BRANCH --oneline
And, use git-unpushed from your git client command prompt.
Even better, if you want git client (on your machine) to remember an alias of your liking (that can be used as command later)
$ git config --global alias.unpushed'!GIT_CURRENT_BRANCH=$(git name-rev --name-only HEAD); git log origin/$GIT_CURRENT_BRANCH..$GIT_CURRENT_BRANCH --oneline'
Then use git unpsuhed from your git client command prompt.
No comments:
Post a Comment