Today I learned that if I want to fetch changes from a remote branch to a different local branch, all I have to do is:
git checkout <local-branch>
git pull origin <remote-branch>
For example, if I would like to fetch changes from master
to a test
branch:
git checkout test // we move to test branch
git pull origin master // we pull data from master to test
Top comments (0)