I have two branches in a Github repository. I'd like to pull the code from one of the branches and overwrite the code in Android Studio.
What I've tried:
Now, when I check the code in Android Studio, it is still the same. Nothing has been updated. What am I missing?
Ok, so I was able to fix this somehow.
I tried pulling from my terminal (not the one on Android Studio) like this:
git pull {repo} {remote-branch}:{local-branch}
and it said something like this: "Non-Fast-Forward rejected!".
I just added --force at the pull command like so:
git pull --force {repo} {remote-branch}:{local-branch}
And it worked.