Vin
Vin

Reputation: 177

Pulling a feature branch into my other feature branch

I checked out my branch where I want to pull another branch and I did git merge but I received that it does not point to a commit and requires a single revision.

git checkout feature/branch1
git merge feature/branch2     # Does not point to a commit
git rebase feature/branch2    # Needed a single revision

I also tried git pull but recieved:

git pull feature/branch2      # Does not appear to be a git repository

How should I copy data from feature/branch2 to feature/branch1?

Upvotes: 1

Views: 1633

Answers (1)

Mike Faber
Mike Faber

Reputation: 481

You need to use git pull origin feature/branch2. Replace origin with whatever you've named the remote repository.

The command works like this:

git pull [remote name] [branch name]

Which explains why you're getting the error message "Does not appear to be a git repository."

Upvotes: 2

Related Questions