I have a branch called 'my-feature' which tracks remote branch 'origin/my-feature'.
I also have a main branch where all development activity goes (trunk). It's 'dev' and the remote tracking branch is 'origin/dev'.
I create 'my-feature' branch from 'dev' to start with.
I would like to pull all the latest updates from 'dev' branch into my local 'my-feature' branch. When I applied the following command, it failed.
$ git pull --rebase origin/dev
fatal: 'origin/dev' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
How I can pull the remote branch changes into my local branch, if the above is incorrect?
Regards,
Okay, My bad.
When I interpret the manual in this way, things become easier.
Provided that I've checked out the branch ( my-feature
I'm trying to work on:
Git pull origin dev
This means, "fetch updates from origin
, and then merge latest from origin/dev
into my-feature
branch.
And to find out what origin
means:
git remote --verbose
gives out what origin
is for push/pull.
我认为您需要像这样运行:
git pull --rebase origin dev
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.