An alias for fuzzy commits, no matter what industry I'm in?

I have a git alias that looks like this:

[alias]
        unpushed = log origin..HEAD --pretty=format:'%h %an %s'

Which works great for showing "unclean" changes when I'm on the host. But this alias does not actually work correctly when I am on a branch.

Which correct command should show unstated changes no matter if I find on a branch?

+5
source share
3 answers

If you just want to see outgoing commits for the current branch, you can use the following:

git config alias.unpushed "log @{u}.. --pretty=format:'%h %an %s'"

, git log , HEAD, , . @{u}.. @{u}..HEAD, @{u} (, origin/foo, foo).

, :

git config alias.unpushed "log --all --not --remotes --tags --pretty=format:'%h %an %s'"

git log , () (, origin/master) . Git , , ( , --tags).

, :

# unpushed:  graph of everything excluding pushed/tag commits
# with boundary commits (see below for 'git g' alias)
git config alias.unpushed '!git g --not --remotes --tags'

# go:  _G_raph of _O_utgoing commits with boundary commits
# (see below for 'git gb' alias)
git config alias.go '!git gb @{u}..'

# g:  _G_raph of everything with boundary commits
git config alias.g '!git gb --all'

# gb:  _G_raph of current _B_ranch (or arguments) with boundary commits
git config alias.gb '!git gbnb --boundary'

# gbnb:  _G_raph of current _B_ranch (or arguments) with _N_o _B_oundary commits
git config alias.gbnb 'log --graph --date-order --pretty=tformat:"%C(yellow)%h%Creset %C(magenta)%aE %ai%Creset %C(green bold)%d%Creset%n        %s"'

git g . ( ) git gb . , git push ( push.default upstream), git go. , - , (, , , ), git unpushed.

+5
+1

:

git config alias.unpushed "log $(git rev-parse --symbolic-full-name @{u})..HEAD --pretty=format:'%h %an %s'"

(, refs/remotes/origin/master) HEAD. refspec git.

fetch pull - , , ... .. .

+1
source

All Articles