Skip to content

Latest commit

 

History

History
134 lines (73 loc) · 3.87 KB

File metadata and controls

134 lines (73 loc) · 3.87 KB

GitHub Desktop

Installation

Windows Installation

To install GitHub Desktop on Windows use:

winget install GitHub.GitHubDesktop

Ubuntu Installation

To install GitHub Desktop on Ubuntu use the @shiftkey package needs to be added:

wget -qO - https://apt.packages.shiftkey.dev/gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/shiftkey-packages.gpg > /dev/null
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/shiftkey-packages.gpg] https://apt.packages.shiftkey.dev/ubuntu/ any main" > /etc/apt/sources.list.d/shiftkey-packages.list'

Then GitHub Desktop can be installed:

sudo apt update && sudo apt install github-desktop

Installation instructions taken from the ShiftKey Repository

Cloning a Repository

Once GitHub is installed, launch it using its icon from the start menu:

img_001

Select sign in to GitHub.com:

img_002

This will take you to the GitHub website where you can sign in to your GitHub account:

img_003

Select open xdg-open:

img_004

Select use my GitHub account name and email address and select Finish:

img_005

Select Clone a Repository from the Internet:

img_006

If you have personal repositories they will be listed under the GitHub.com tab:

img_007

Alternatively select URL and then paste in the URL:

https://github.com/PhilipYip1988/python-notebooks 

This will download the repository to a local path within Documents/GitHub. Select Clone:

img_008

This will download all the files to the local folder:

img_009

The GitHub Desktop will list any changes you made to the repository:

img_010

The GitHub repository is in Documents or OneDrive/Documents:

img_011

Then the GitHub subfolder:

img_012

Then the name of the repository:

img_013

Forking a Repository

The readme.md file is normally opened in JupyterLab or VSCode however for this example it can be opened in text editor:

img_014

If a change is made and saved:

img_015

img_016

The GitHub Desktop will list the changes made. Since this is not your repository, you cannot Commit to Main. However you can create your own fork:

img_017

Select fork this repository:

img_018

Select for my own purposes:

img_019

Now give details about the update made and select Commit to Main:

img_020

Select Push Origin:

img_021

The changes will be made to your forked version of the repository:

img_022

This will show under your profile:

img_023

When working with a GitHub repository on multiple computers A and B. If you make changes to the repository on A, you will be able to push changes to the repository on A and then pull changes from the repository on B using GitHub Desktop.

Return to Python Tutorials