Let’s say somebody already push their branch in remote called “finances”. We want to fetch and working on this branch from our local. So, the solution :
1 2 3 4 5 | git fetch –all Fetching origin From github.com:polatic/vasham-erp * [new branch] finance -> origin/finance |
Then, we checkout with tracking
1 2 3 | git checkout -t origin/finance Branch finance set up to track remote branch finance from origin. Switched to a new branch ‘finance’ |
Now ready for working :
1 | git checkout finance |