Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
.Rhistory
.RData
.Ruserdata
docs
docs
*.Rproj
1 change: 0 additions & 1 deletion git-in-statistical-programming.Rproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Version: 1.0
ProjectId: f88a3db9-ec2d-4fb9-81d1-af2d80e1823a

RestoreWorkspace: Default
SaveWorkspace: Default
Expand Down
Binary file added site/posts/github-desktop/account.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/posts/github-desktop/clone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/posts/github-desktop/commit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
114 changes: 114 additions & 0 deletions site/posts/github-desktop/index.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
title: "GitHub Desktop"
subtitle: "Streamline git process without code"
author: "alex"
date: "2025-01-29"
categories: [tools, qol, gui]
image: "thumb.png"
# grid:
# sidebar-width: 050px
# body-width: 1200px
# margin-width: 250px
# gutter-width: 1.5rem
toc: TRUE
toc-title: "Table of contents"
toc-depth: 5
---

This blog post covers the most common and basic git operations that be done using GitHub Desktop. It can be used with other Git hosting services such, but the focus will be on GitHub in this post.

## What is GitHub Desktop?

[**Github Desktop**](https://desktop.github.com/) is a **free and open-source** software that provides a **graphical user interface** to use git instead of using the prompts. It means you don't need to learn how to use the command lines to have a proper usage of Git.

### Features

It allows you to:

- Clone a repository to your local environment

- Rebase your current branch

- Write commit messages and push branches to your distant repository

- Open a pull request

And a lot more.

::: callout-note
##### A lot of features

This blog post focuses on the actions described above and do not cover specificities such as code review.
:::

### Installation and setup

#### Download

GitHub Desktop is available for Windows and Mac and can be download from [this link](https://desktop.github.com/download/).

::: callout-tip
##### Linux user?

GitHub Desktop is not officially available on Linux. Still, a [fork](https://github.com/shiftkey/desktop) version can be installed.
:::

#### Associate GitHub Account

By opening the `File > Options...` menu, you will be able to connect your GitHub account directly.

![](account.png)

## Clone a repository

A repository hosted on GitHub can be cloned in two clicks. From the repository page, click on *Code* and then *Open with GitHub Desktop*.

![](clone.png)

## Start coding

The top screen menu allows you to:

- Select the repository you want to work on

- Select the branch you want to work on

- Retrieve the latest changes from the remote repository without applying them to your working directory using *Fetch origin*

When your branch is selected you can run the coding software of your choice and that coding.

![](open-software.png)

::: callout-tip
## Supported editors

The list of supported editors is available [here](https://docs.github.com/en/desktop/configuring-and-customizing-github-desktop/configuring-a-default-editor-in-github-desktop?platform=windows "https://docs.github.com").
:::

## Commit changes, push branches and pull request

Once you're ready with an addition or modification of a program, the update history is automatically displayed in GitHub Desktop.

![](update-history.png)

In the bottom left corner of the GitHub Desktop window, you can write a clear can concise **commit message** that will describe your modifications and status. The "Description" field can be used to add more information.

![](commit.png)

Once the commit is done, you can **push** your branch from your local folder to the remote repository.

![](push.png)

Then the remote repository will be updated.

![](push-remote.png)

Finally, when you are ready to open a **pull request** directly from GitHub Desktop.

![](pull-request.png)

The GitHub webpage will open in the pull request creation webpage.

![](pull-request-remote.png)

The code review can be done directly form GitHub or from GitHub Desktop.
Binary file added site/posts/github-desktop/open-software.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/posts/github-desktop/pull-request-remote.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/posts/github-desktop/pull-request.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/posts/github-desktop/push-remote.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/posts/github-desktop/push.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/posts/github-desktop/thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/posts/github-desktop/update-history.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.