Git alias:
track = "!f(){ \
branch=$(git rev-parse --abbrev-ref HEAD);
cmd=\"git branch $branch -u ${1:-origin}/${2:-$branch}\"; \
echo $cmd; \
$cmd; \
}; f"
Example:
git track
Compare git untrack.
Git alias:
track = "!f(){ \
branch=$(git rev-parse --abbrev-ref HEAD);
cmd=\"git branch $branch -u ${1:-origin}/${2:-$branch}\"; \
echo $cmd; \
$cmd; \
}; f"
Example:
git track
Compare git untrack.