Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 4

Change branch in github desktop

Sorry if this is easily found, but I want to ignore the branch I am currently on and go to another branch so I go to current branch -> upstream/master changed 2 days ago and it tells me a branch with that name already exists .  I don't understand the error that the branch exists is exactly the point. also on the bottom it says "choose a branch to merge into master" .  

3 Replies
Highlighted
Copilot Lvl 2
Message 2 of 4

Re: Change branch in github desktop

Since there hasn't been any replies, I'll try to help even though I'm not that well versed in using GitHub myself.

Lets rewind and try to reproduce your steps. I'm guessing that  you have forked some repo and you have a copy of it on your computer, and you are working on, right?

 

What are you trying to do next? Or have you already figured out this problem by yourself?

Highlighted
Copilot Lvl 2
Message 3 of 4

Re: Change branch in github desktop

I'm abandoning my edits and want the repository on my computer to show the main branch

Highlighted
Copilot Lvl 2
Message 4 of 4

Re: Change branch in github desktop

There are probably  more ways than these to do this, and you should use your own discretion when you decide how to proceed.

1. If there are only few changes that you want to revert, you could go to the History tab, and starting from the top, right-click and use the Revert this commit -option.

2. If you want use the command line to fix this, you could do a Hard reset to get things as they were.

3. You could also go to your GitHub page and delete your fork throught the settings page, and then create a new one.

 

Personally I haven't done any of those myself. So be careful what ever you do.