Skip to content

Instantly share code, notes, and snippets.

View Bigsby's full-sized avatar
💭
I have my moments...

Bruno Bernardo Bigsby

💭
I have my moments...
View GitHub Profile
docs:
https://git.wiki.kernel.org/index.php/Aliases#Getting_the_diff_of_a_branch_since_it_forked_from_another_branch.2C_or_since_the_last_merge
complex example:
https://medium.com/@vitalyb/creating-powerful-git-aliases-3dfc0efc9a31#.o07jp91ea
cleanall = "!git reset --hard;git clean -fd"
diffu = !current=$(git symbolic-ref --short HEAD) && git log --oneline $current...origin/$current;
dBranch = "!f() { \
git log --oneline $1...origin/$1; \

List System Path

for %a in ("%path:;=";"%") do @echo %~a

Fetch Remote Branch

git fetch <remote> <remote_branch>:<local_branch> 
git checkout <local_branch>
git branch -u <remote>/<remote_branch>

Fetch Remote Branch - When branch doesn't exist locally