0

I have a develop branch and a feature branch. I did some commits to develop branch after I created the feature branch from the develop branch. And also did some commits to feature branch. So the current situation is like this

A--B--C-----F--G (develop)
       \
        D--E (feature)

Then did a interactive rebase to feature branch and squash commits to single commit.

Then I tried to push the feature branch with git push -f and git push origin --force but it ended up with getting a error remote: Repository not found.

what I want to do here is merge the changes of feature branch to develop without effecting changes done in develop branch.

Have I done any wrong thing here or are there any better way to achieve my goal?

  • Try this first: https://stackoverflow.com/a/53047420/14104186. If not, check to see the remote is correct – The Otterlord Sep 28 '20 at 09:27
  • 3
    By "Repository not found", there might be a spelling mistake in `git config remote.origin.url`. It's also possible that `git push` is using an username which does not have access to the repository. – ElpieKay Sep 28 '20 at 09:29
  • @ElpieKay remote origin url is set to `https://github.com/myRepo/web.git` – Dhanushka Naleen Sep 28 '20 at 09:37
  • 3
    The rebase did not cause the problem here. "Repository not found" indicates either that the repository really isn't there (possible but unlikely since you have checked) or that for some reason you no longer have permission to write to it or even to tell that it is there (likely, if you're using http or https, as GitHub are moving towards requiring ssh access, and will be turning off https write permission site-wide occasionally to prod people to move to ssh). – torek Sep 28 '20 at 10:49
  • Please execute `git remote -v` to verify the url of remote, and make sure the remote repository exists and you have permission to access it. – Chuck Lu Sep 29 '20 at 01:38

0 Answers0