-2

I have a remote repository that pulls into my local branch A. Now I created a new branch B from A.

What is the command to pull changes of the remote repo into B?

user3443063
  • 1,455
  • 4
  • 23
  • 37
  • You need a good Git tutorial here. Git is about commits; commits aren't actually *changes*, and branch names are just a way that lets humans *find* Git commits. The `git pull` command is a convenience short-cut for two more basic Git commands: (1) `git fetch`, and (2) a second command of your choice. You should learn each command separately, rather than relying on the combination convenience command, as the second command has a tendency to have something go wrong, and the *recovery* process depends on *which second command you run*. So you need to know more here. – torek Jul 11 '22 at 23:04
  • It's not usually a lot of fun (people gripe a lot about Git's steep hill to get started) but you really do need to learn these things, or you'll find yourself in Git-Hell rather suddenly. You might still find yourself in Git-Hell anyway, but you'll have a better idea what to do about it. – torek Jul 11 '22 at 23:05
  • actually I am in very deep git-Hell :-(( :-) – user3443063 Jul 15 '22 at 12:19

1 Answers1

2

If you are currently on branch B, you can use following command

git pull origin [remote branch name]
Joe199382
  • 199
  • 1
  • 12