Search code examples
gitgithub-desktop

Can I git checkout from GitHub Desktop?


Is there a way to rewrite repository directory files to current branch state in GitHub Desktop?

Or can I only do it from command line with git checkout mybranch

and does GitHub Desktop keep all files of all branches in directory?


Solution

  • I will describe how to checkout on GitHub Desktop, which is equivalent to merging you current branch with the master branch. There are four steps you take(Branch names have been blanked out for privacy).

    1. Go to the tab that shows the current branch.

    enter image description here

    1. Change the current branch to the Master branch.

    enter image description here

    1. Go back to the tab (now with master branch as current) and at the bottom click on "Choose the branch to merge with master".

    enter image description here

    1. On the screen that comes up chose the branch that you have been working on and click on merge with master.

    enter image description here

    These steps assume that you have pulled all the changes on the master into your current branch to avoid any conflict. If there are issues try to ensure that the branch you are working on has been updated by changes in the Master.