Firstly clone the repositories and then check all the branches using
1. Fetch all remote branches
git fetch origin
This fetches all the remote branches from the repository. origin is the remote name you're targetting. So if you had an upstream remote name, you can call git fetch upstream.
2. Check your branches ( -a means all ; remote + local))
git branch -a
Then you can use your desired branch by creating one in your local system while copying all the content from remote branch.
3. Pull changes to your remote branch
git pull origin dev-bn
- it creates a new branch called dev-bn
- it pulls changes from origin/dev-bn to that branch
Here our target is to work with the dev-bn branch and thus doing this.
Now I can easily switch to my dev-bn branch which is connected to the remote dev-bn branch as well.
Top comments (0)