Shallow dive into #git aliases. 2/2
To debug git aliases run this command
$ export GIT_TRACE=1
What I have accomplished is I'm able to track remote branch by typing only
$ git track <remote_branch_name>
If I want to track and switch, I can use aliases recursively
[alias]
swtrack = "!f(){ git track $1; git checkout $1; }; f"
Further reading:
Git Aliases -- https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases
One weird trick for powerful Git aliases -- https://www.atlassian.com/blog/git/advanced-git-aliases