Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
github-desktop [2022/01/27 06:21] – [Linux-based distributions] added info about AppImage/manual installation atarigithub-desktop [2023/04/27 02:37] (current) – [Make a pull request] update tip about new feature atari
Line 47: Line 47:
 ==== Mac ==== ==== Mac ====
  
-FIXME+Easy: 
 +  - Go to [[https://desktop.github.com/|Github Desktop's download page]] 
 +  - Click "Download for macOS" and extract the downloaded ZIP archive 
 +  - Double-click ''GitHub Desktop'' from the extracted files 
 +  - Follow the on-screen instructions
  
 ==== Linux-based distributions ==== ==== Linux-based distributions ====
Line 59: Line 63:
 </WRAP> </WRAP>
  
 +<WRAP center round tip>
 +On Solus, using the AppImage is recommended. Download it and mark it as executable. Installing Chrome (from the third party section in the software updater) is required to authenticate the sign-in. <wrap lo>You don't actually need to use Chrome itself to do the authentication, it just needs to be installed. Yeah.</wrap>
 +</WRAP>
  
 ===== Setting up Github Desktop ===== ===== Setting up Github Desktop =====
Line 69: Line 76:
  
 {{:github-desktop-signed-in.png?direct&500|}} {{:github-desktop-signed-in.png?direct&500|}}
 +
 +<WRAP center round help>
 +If having difficulty getting your browser to recognize the protocol (either due to weird permission issues or manual installation), reboot your computer and try again. Seriously. Github Desktop installs the protocol handlers which only get activated on boot for some operating systems.
 +
 +If it's still failing after that, it is possible to copy and paste a known-working configuration folder from another operating system into the one you are having the difficulties with.
 +
 +  * Windows config folder: ''Users\<Your username>\AppData\Roaming\GitHub Desktop''
 +  * Linux config folder: ''~/.config/GitHub Desktop''
 +
 +Make sure GitHub Desktop is closed before doing this.
 +</WRAP>
  
 ==== Fixing submodule downloading ==== ==== Fixing submodule downloading ====
  
-Batocera makes ludicrous use of submodules to compile. You'll find that when attempting to make new branches, they'll default to an older version of the submodule than the one that's currently being used. To work around this, add the following lines to your global gitconfig (on Windows, this is at ''C:\Users\<your name>\.gitconfig''):+Batocera makes ludicrous use of submodules to compile. You'll find that when attempting to make new branches, they'll default to an older version of the submodule than the one that's currently being used. To work around this, add the following lines to your global gitconfig (on Windows, this is at ''C:\Users\<your name>\.gitconfig''; on Linux, this is at ''~/.gitconfig''):
  
 <code> <code>
Line 91: Line 109:
 {{:github-desktop-clone-repo.png?nolink&400|}} {{:github-desktop-clone-repo.png?nolink&400|}}
  
-If you've already forked the project, great! Just click it here and clone it, choosing to contribute to the parent project. Otherwise, click on **URL** at the top to switch to another screen.+If you've already forked the project, great! Just click it here and clone it, choosing to contribute to the parent project. 
 + 
 +Otherwise, click on **URL** at the top to switch to another screen.
  
 Enter the URL of the repository you want to clone. Here, I will be copying the [[https://github.com/batocera-linux/batocera-bezel|batocera-bezels]] repository, but the process is identical for [[https://github.com/batocera-linux/batocera.linux|batocera.linux]] as well. This is what it should look like: Enter the URL of the repository you want to clone. Here, I will be copying the [[https://github.com/batocera-linux/batocera-bezel|batocera-bezels]] repository, but the process is identical for [[https://github.com/batocera-linux/batocera.linux|batocera.linux]] as well. This is what it should look like:
Line 100: Line 120:
  
 {{:github-desktop-cloning.png?direct&400|}} {{:github-desktop-cloning.png?direct&400|}}
 +
 +When asked what project you'd like to contribute to, select the one hosted by batocera.linux, not recalbox or your own account.
  
 ==== Create a new branch ==== ==== Create a new branch ====
Line 122: Line 144:
  
 <WRAP center round info> <WRAP center round info>
-If you're cloning an already forked project, this step will not be necessary.+If you're cloning an already forked project, this step will not occur.
 </WRAP> </WRAP>
  
-You'll then be asked how you'd like to use the project. Leave it on **To contribute to the parent project** and click **Continue**:+You'll then be asked how you'd like to use the project. Leave it on **To contribute to the parent project** pointed at batocera.linux and click **Continue**:
  
 {{:github-desktop-how-to-use-project.png?direct&400|}} {{:github-desktop-how-to-use-project.png?direct&400|}}
Line 158: Line 180:
  
 {{:github-desktop-pull-request.png?nolink&500|}} {{:github-desktop-pull-request.png?nolink&500|}}
 +
 +<WRAP center round tip>
 +New feature: Pull request changes can be previewed in Github Desktop before going to the web page to preview it. This can be useful, but it's not needed right now. Click the down arrow next to the **Preview Pull Request** to switch it back to **Create Pull Request**.
 +</WRAP>
  
 Github is smart enough to automatically insert the title and description you entered for the commit you made earlier, but do note that this is only for the first commit you made. If you've made multiple commits, make sure to double check the fields here. Github is smart enough to automatically insert the title and description you entered for the commit you made earlier, but do note that this is only for the first commit you made. If you've made multiple commits, make sure to double check the fields here.
Line 189: Line 215:
   - Click on **History** near the top left of the window   - Click on **History** near the top left of the window
   - Select the commits you wish to squash (either by holding ''[Ctrl]'' and clicking each one or holding ''[Shift]'' and selecting the first commit you made)   - Select the commits you wish to squash (either by holding ''[Ctrl]'' and clicking each one or holding ''[Shift]'' and selecting the first commit you made)
-  - Right-click and select **Squash <#> commits** {{ :github-desktop-squash-commits.png?direct |}} +  - Right-click and select **Squash <#> commits** {{:github-desktop-squash-commits.png?direct|}} 
-  - Create a new title and description that includes all your changes {{ :github-desktop-squash-description.png?nolink |}} {{ :github-desktop-squash-successful.png?direct&1000 |}} +  - Create a new title and description that includes all your changes\\ {{:github-desktop-squash-description.png?nolink|}} {{:github-desktop-squash-successful.png?direct&1000|}} 
-  - Click **Force push origin** {{ :github-desktop-force-push-origin.png?direct&720 |}} +  - Click **Force push origin**\\ {{:github-desktop-force-push-origin.png?direct&720|}} 
-  - Confirm the changes have been reflected in the pull request {{ :github-force-push-confirmation.png?direct&720 |}} {{ :github-check-force-push.png?direct&900 |}}+  - Confirm the changes have been reflected in the pull request\\ {{:github-force-push-confirmation.png?direct&720|}} {{:github-check-force-push.png?direct&900|}}
  
 ==== Fetch upstream changes ==== ==== Fetch upstream changes ====
Line 204: Line 230:
 {{:out_of_date_on_github.png?direct|}} {{:out_of_date_on_github.png?direct|}}
  
-To repair this, there are two methods:+To repair this, there are multiple methods: 
 + 
 +=== Just use batocera.linux's master branch from upstream === 
 + 
 +This is the simplest solution, just use batocera.linux's ''upstream/master'' branch instead. However, if you attempt to do this, you'll be met with a "Fatal: this branch already exists" error. This is because your fork's master branch has the same name. This can be worked around by either: 
 + 
 +  * Renaming the ''master'' branch to something unique; or 
 +  * Deleting the ''master'' branch locally from your computer 
 + 
 +To do the latter, first be on a branch that isn't master, then right-click the local ''master'' branch (it shouldn't have anything ahead of it like ''upstream/'' or ''origin/'') and choose to delete it. If you are offered to delete the branch on the remote as well, decline (what's on the remote doesn't truly matter for our purposes here). You'll then be able to switch to ''upstream/master'' with no issues.
  
-=== Quick and dirty ===+=== Merging/rebasing the master branch ===
  
 Similar to the command line procedure, we will merge directly from upstream. If you choose to use this method, this needs to be done every time you want to sync with upstream. Similar to the command line procedure, we will merge directly from upstream. If you choose to use this method, this needs to be done every time you want to sync with upstream.
Line 212: Line 247:
 == Using Github Desktop == == Using Github Desktop ==
  
-Merge the upstream/master branch to your own master branch clicking **Current branch** -> select the "master" branch of your fork -> **Current branch** (again) -> **Choose a branch to merge into master**. That will bring the merge window up. Choose "upstream/master" from the list and **Create a merge commit**:+Merge the upstream/master branch to your own master branch clicking **Current branch** -> select the "master" branch of your fork -> **Current branch** (again) -> **Choose a branch to merge into master**. That will bring the merge window up. Choose "upstream/master" from the list and **Create a merge commit** (or if you want a "cleaner" commit history, **Rebase**):
  
 {{:github-desktop-merge-upstream-master.png?direct&400|}} {{:github-desktop-merge-upstream-master.png?direct&400|}}
Line 220: Line 255:
 == Using Github webpages == == Using Github webpages ==
  
-Navigate to ''%%https://github.com/<your name>/batocera-bezel%%'', select **Fetch upstream** -> **Fetch and merge**:+Navigate to ''%%https://github.com/<your name>/batocera.linux%%'', select **Fetch upstream** -> **Fetch and merge**:
  
 {{:github-fetch-and-merge-upstream.png?direct&600|}} {{:github-fetch-and-merge-upstream.png?direct&600|}}
Line 232: Line 267:
 {{:up_to_date_github.png?nolink&800|}} {{:up_to_date_github.png?nolink&800|}}
  
-=== Long and clean (permanent) ===+=== Redirecting the local master branch header ===
  
 Instead, you can edit the branch settings for your ''master'' branch to instead fetch from upstream instead of your fork (origin). This only needs to be done once. Instead, you can edit the branch settings for your ''master'' branch to instead fetch from upstream instead of your fork (origin). This only needs to be done once.
Line 269: Line 304:
 ==== I can't sign in/authentication fails/can't push commits to my remote ==== ==== I can't sign in/authentication fails/can't push commits to my remote ====
  
-Try resetting your username and authentication token by going to **File** -> **Options** -> **Accounts** -> **Sign Out**, then signing in again.+Try resetting your username and authentication token by going to **File** -> **Options** -> **Accounts** -> **Sign Out**, then signing in again. You may also need to explicitly sign out of Github on your web browser to get it to regenerate a new, valid token.
  
 ==== Other/more complicated issues ==== ==== Other/more complicated issues ====
  • github-desktop.1643264474.txt.gz
  • Last modified: 4 years ago
  • by atari