git

git set up to track remote branch

hejliang

Liang Wang

Posted on February 5, 2024

git set up to track remote branch

I create a new branch locally, commit the code, now would like to push it to origin and track remote branch with the same name.

Example

create and check out new local branch called dev

git co -b dev

Enter fullscreen mode Exit fullscreen mode

set up to track remote branch 'dev' from 'origin'

git push -u origin dev
Enter fullscreen mode Exit fullscreen mode

git co is my alias for commit.

💖 💪 🙅 🚩
hejliang
Liang Wang

Posted on February 5, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related