Step-by-step Guide to Using GitHub Desktop on Windows
Published
7 min read
How to Use GitHub Desktop in Windows 10 and 11
GitHub Desktop is a graphical user interface for managing your Git repositories. It simplifies the Git workflow by providing an intuitive interface, making it easier for developers and beginners alike to understand and use Git and GitHub without delving deeply into command-line operations. This article will guide you through the entire process of setting up and using GitHub Desktop on Windows 10 and 11.
Installation of GitHub Desktop
First, you need to download and install GitHub Desktop on your Windows machine. Follow these steps for a seamless installation:
-
Download GitHub Desktop: Go to the official GitHub Desktop website and click the download button appropriate for your operating system. This will download the latest version for Windows.
-
Install the Application: Open the downloaded
.exe
file. Windows may prompt you with a security warning; click ‘Run’ to proceed. Follow the installation prompts: accept the terms, choose the installation folder, and click ‘Install’. -
Launch GitHub Desktop: Once the installation is complete, launch GitHub Desktop from your Start menu or by searching for it.
-
Sign in to GitHub: Upon the first launch, the application will prompt you to sign into your GitHub account. If you do not have an account yet, you can easily create one through the interface. Signing into your account will allow you to synchronize your repositories and settings.
Setting Up Your First Repository
After completing the installation and sign-in process, you can create your first local repository or clone an existing one. Here’s how:
-
Create a New Repository:
- Click on «File» in the menu, then choose «New repository.»
- Fill in the repository name, description, and choose a local path where it will be stored.
- You can initialize the repository with a
README.md
, add a.gitignore
file, and choose a license if needed. - Click on the “Create repository” button, and you will see a new local repository created.
-
Clone an Existing Repository:
- To clone an existing GitHub repository, click on «File» and select «Clone repository.»
- In the “Clone a repository” dialog, you can either browse your folders or paste the URL of the repository you wish to clone.
- After selecting the repository, choose the local path for the clone and click on “Clone.”
Navigating the Interface
The interface of GitHub Desktop is user-friendly and allows you to navigate through various functionalities easily. Here’s a quick overview:
- Current Repository: At the top left corner, you can see and switch between your repositories.
- Changes Tab: This tab shows the uncommitted changes you have made. It lists modified files and also allows you to stage or discard changes.
- History Tab: This tab displays the commit history of your repository, showing you a list of all the commits you have made, along with commit messages and timestamps.
- Branch Menu: This button allows you to manage your branches. You can create new branches, merge branches, and switch between branches with ease.
- Pull Requests: From this section, you can view and manage pull requests, facilitating collaboration with other contributors.
Committing Changes
After making changes to your code, the next step is to commit these changes in your repository:
-
Stage Your Changes: In the Changes tab, you will see a list of files changed. You can select the files to stage them for commit. Click on the checkbox next to the files you want to stage.
-
Write a Commit Message: Below the list of changed files, there’s a field for writing a commit message. Always write a clear and concise message explaining the changes you’ve made.
-
Commit to Master: Once your changes are staged and a commit message is written, click on the “Commit to main” (or whatever your main branch is named) button to commit your changes locally.
Syncing Changes with GitHub
After committing your changes locally, you need to push those changes to your GitHub repository. Here’s how you can do it:
-
Push Changes: Once you have committed your changes, a message will appear indicating that your branch is ahead of the origin by X commits. Click on the “Push origin” button to send your commits to GitHub.
-
Fetch Changes: If collaborators are also working on the same repository, you might want to fetch their changes. You can do this by clicking on the “Fetch origin” button, which will retrieve any changes from GitHub without merging them into your branch immediately.
-
Pull Changes: If you are ready to merge fetched changes into your branch, click on “Pull origin.” This action will update your local files to match the remote repository.
Branching Strategies
Branching is a powerful feature in Git that allows you to isolate work without affecting the primary codebase. Here’s how to efficiently use branches in GitHub Desktop:
-
Create a New Branch: To create a new branch, click on the “Current branch” dropdown and select “New branch.” Give it a meaningful name related to the features or fixes you are working on.
-
Switching Branches: If you need to switch branches, simply go to the “Current branch” dropdown and select the branch you want to work on. GitHub Desktop will automatically switch your working directory to that branch.
-
Merging Branches: When the development on your feature branch is complete, you can merge it back to the main branch. Change back to the main branch, then click on “Branch” in the menu and select “Merge into current branch.” Choose your feature branch and confirm the merge.
Handling Merge Conflicts
Merge conflicts occur when changes in different branches clash with one another. Here’s how to resolve them in GitHub Desktop:
-
Pulling Changes: If you pull changes and encounter conflicts, GitHub Desktop will notify you in the changes tab.
-
View Conflicts: Click on the conflicted file, and GitHub Desktop will show the differences. It will highlight conflicting areas, allowing you to decide which changes to keep.
-
Resolve Conflicts: Manually edit the files in your preferred code editor to resolve the conflicts, then save the files. Go back to GitHub Desktop.
-
Mark as Resolved: After resolving the conflicts in your editor, return to GitHub Desktop. Click on “Mark as resolved” for each conflicted file, and then commit your resolutions.
Collaborating with Others
GitHub Desktop makes collaboration easy if you’re working with a team. Here’s how you can effectively collaborate:
-
Forking a Repository: If you want to contribute to someone else’s project, forking it is a good approach. This creates a copy of the repository under your GitHub account. Use the “Fork” button on the repository web page to do this.
-
Creating Pull Requests: Once your changes are ready on your feature branch, you can create a pull request to propose merging your changes back into the original repository. This is done through the GitHub web interface.
-
Reviewing Pull Requests: In the GitHub repository, you can review any pending pull requests. This allows team members to leave comments, suggest changes, or approve the pull request.
-
Issues and Discussions: GitHub also provides built-in issue tracking and discussions, allowing you to report bugs or request features directly in the repository. Use the «Issues» tab on the GitHub web interface to create or view issues.
Best Practices with GitHub Desktop
To make the most out of GitHub Desktop, consider these best practices:
-
Commit Often: Make small, frequent commits with meaningful messages. This practice makes it easier to track changes over time and revert if necessary.
-
Branch Naming Conventions: Use clear naming conventions for branches. For instance,
feature/add-login
orbugfix/fix-header
, which provide context about the work being done. -
Collaborate Responsibly: Communicate with your team about changes. Use pull requests for collaborative projects and include comments explaining complex changes.
-
Review Changes Before Committing: Always review your changes in GitHub Desktop before committing. Check the status of each file to ensure you’re committing the right modifications.
-
Regular Syncing: Frequently sync with the remote repository to stay updated on changes made by your collaborators.
Tips and Troubleshooting
While using GitHub Desktop, you might encounter various issues or have questions. Here are some tips to help you troubleshoot:
-
Connection Issues: If you have trouble connecting to GitHub, verify your internet connection. Temporarily disable any VPNs or firewalls that might block the connection.
-
Authentication Errors: If you experience authentication issues, ensure that your credentials (username and password) are correct. You can reset your access tokens from your GitHub account settings if needed.
-
Stash Changes: If you need to switch branches but want to keep your work safe, consider stashing changes. GitHub Desktop does not support stashing directly; you’ll need to use Git Bash or the command line for this.
-
Updates: Regularly check for updates to GitHub Desktop to benefit from new features and security improvements.
-
Community Support: If you have further questions or want to learn more, explore the GitHub Community Forum or check out the documentation on the GitHub website for comprehensive support.
Conclusion
GitHub Desktop is an excellent tool for managing Git repositories on Windows 10 and 11, providing a user-friendly interface that simplifies the overall workflow. From setting up the application and managing repositories to collaborating with teams and resolving conflicts, GitHub Desktop facilitates an efficient development environment. By following the methods and best practices outlined above, you can enhance your ability to work with Git and GitHub, streamline your development process, and contribute effectively to communal coding projects. Embrace the power of GitHub Desktop, and elevate your coding endeavors to new heights.
GitHub is a popular version control tool for software development. The base version is a simple command line tool. It lets you access your Git repository and collaborate alongside other developers. GitHub Desktop is a graphic user interface (GUI) that can be easily installed on your system. This step-by-step guide covers how to install GitHub on Windows 64-bit systems and launch it for the first time.
GitHub system requirements
Before you install GitHub Desktop, make sure that you select a version that’s compatible with your operating system! GitHub Desktop is compatible with Windows 10 64-bit or later.
Don’t feel bad if you’re using a 32-bit system though. You may not be able to install GitHub Desktop, but there are some great GitHub alternatives out there. Some 32-bit OS users even prefer them to the official client!
The easiest way to install GitHub Desktop is to access the official GitHub download page. The main option is to download for Windows (64-bit), which is the one you should select. The smaller links below include options for macOS, networked installation for businesses (an MSI file), and downloading the experimental beta version.
Or if you prefer to use the command line to install GitHub, we’ve put together a Git tutorial that includes installation options.
Step-by-step guide to installing GitHub
Here’s how to install GitHub Desktop on a 64-bit computer running Windows 10 or later.
Step 1: Download GitHub Desktop
Launch a web browser. Click on this link to visit the official GitHub Desktop download page. As mentioned above, click “Download for Windows (64bit)” to download the right version of GitHub Desktop.
Step 2: Install GitHub Desktop
To install GitHub, either click on the EXE file in the browser’s download bar or navigate to your downloads folder (unless you changed your browser settings to download files to a different location) and double click the file.
If Windows asks for Admin permissions to install the app, grant them. When the installation is finished, GitHub Desktop automatically launches.
How to get started with GitHub Desktop
After logging into GitHub Desktop (or creating a new account), enter your access data and click “Authorize desktop” to allow GitHub Desktop to sync. This will let you access your existing repositories.
Log in once more and click “Finish”. The GitHub Desktop user interface will open.
Now you can create new repositories, clone existing ones, or add a local repository from your hard drive. It’s that simple!
Was this article helpful?
Введение
В этой инструкции покажем, как установить Git на Windows, и поможем выбрать правильные параметры при установке. Затем создадим репозиторий и зафиксируем в нем изменения. Все это поможет вам сделать первые шаги в освоении Git.
Что такое Git и зачем он нужен
Git — это одна из самых популярных систем контроля версий (VCS). Такие системы помогают разработчикам хранить и версионировать исходный код приложений, настройки систем и другие текстовые файлы. И хотя ничего не мешает использовать VCS в других областях, чаще всего они применяются именно в IT.
Каждое состояние файлов в Git можно зафиксировать (сделать коммит), причем это навсегда останется в истории репозитория. Поэтому можно в любой момент посмотреть историю изменений файлов, сравнить различные версии и отменить отдельные изменения.
Также Git упрощает ведение параллельной разработки несколькими членами команды. Для этого используется ветвление. Условно можно сказать, что в Git-репозитории есть одна основная ветка, в которой хранится текущая стабильная версия исходного кода. Когда разработчик хочет изменить этот код, он «откалывает» себе отдельную ветку от основной и работает в ней. Когда работа закончена, он «вливает» изменения в основную ветку, чтобы его доработками смогли воспользоваться другие члены команды.
На самом деле все это описание довольно грубое, и по работе с Git можно написать не одну статью. На официальном сайте Git есть бесплатная электронная книга, в том числе она переведена на русский язык. А в этой статье мы сосредоточимся на установке Git в Windows и его первоначальной настройке.
Установка Git в Windows
Переходим на официальный сайт Git, в раздел загрузок. Мы увидим несколько вариантов установки: разные разрядности, портативная версия и даже установка из исходников. Мы выберем Standalone-версию, для этого проще всего нажать ссылку Click here to download, она всегда ведет на самую актуальную версию. Запускаем скачанный файл.
Выбор компонентов. Первый экран — выбор компонентов для установки. Если вам нужны дополнительные иконки на рабочем столе, или если вы хотите, чтобы Git ежедневно проверял наличие новой версии, — отметьте соответствующие опции. Остальные параметры лучше оставить по умолчанию.
Текстовый редактор по умолчанию. Необходимо выбрать редактор, который будет использовать Git — например, когда вы будете писать сообщение для коммита. Это не обязательно должен быть редактор, в котором вы планируете писать исходный код.
По умолчанию в установщике выбран Vim — консольный текстовый редактор, который для многих может показаться сложным в освоении. Если вы не знакомы с Vim и при этом хотите именно консольный редактор — выберите nano. Если у вас уже установлен какой-нибудь текстовый редактор — выбирайте его. Мы для примера будем использовать VSCode.
Название первой ветки. Тут нужно выбрать, как Git будет называть первую ветку в каждом репозитории. Раньше такая ветка всегда называлась master, но со временем это стало напоминать о временах рабства, и многие проекты и компании стали переименовывать ветки в своих репозиториях. Поэтому разработчики Git добавили эту опцию, чтобы название первой ветки можно было изменить. Мы будем придерживаться старого поведения и оставим название master.
Способ использования Git. Первая опция сделает Git доступным только из командной строки Git Bash. Это не очень удобно, потому что не позволит пользоваться Git-ом из других оболочек или интегрировать его с редактором кода. Вторая опция самая оптимальная (ее мы и выберем) — она позволяет работать с Git-ом из разных оболочек и интегрировать его с другими приложениями. Третья опция кроме установки Git также «перезапишет» некоторые системные команды Windows аналогами из Unix, и эту опцию нужно выбирать только если вы точно понимаете, что делаете.
Выбор SSH-клиента. Изначально Git поставлялся со встроенным SSH-клиентом, но недавно появилась опция, где можно использовать внешний клиент. Если у вас уже что-то установлено на компьютере — можете выбрать вторую опцию. Мы же остановимся на первой, так как предварительно ничего не устанавливали.
Выбор SSL/TLS библиотеки. По умолчанию Git будет использовать свою OpenSSL библиотеку с заранее определенным списком корневых сертификатов. Обычно этого достаточно, но если вам нужно работать со внутренними репозиториям внутри компании, которые используют самоподписанные сертификаты, выберите вторую опцию. Тогда Git будет использовать библиотеку и сертификаты из вашей операционной системы.
Символы перевода строки. Существует два основных способа формирования конца строки в файлах — CRLF и LF. Первый используется в Windows, второй — в Unix-like системах. Первая опция позволяет извлекать файлы из репозитория в Windows-стиле, при этом отправлять файлы в репозиторий в Unix-стиле. Мы рекомендуем использовать этот вариант, потому что он лучше всего подходит для кросс-платформенной команды, когда над одним кодом могут работать разработчики на разных ОС.
Эмулятор терминала. Эмулятор, который будет использоваться в командной строке Git Bash. MinTTY — удобный вариант, поэтому он выбран по умолчанию. Встроенный эмулятор CMD не очень удобен, у него есть некоторые ограничения, поэтому выбирайте его, только если делаете это осознанно.
Стратегия git pull. Первая опция будет пытаться обновить историю коммитов без создания коммитов слияния. Это самый оптимальный и часто используемый вариант, оставим его.
Credential Manager. Установка этого параметра позволит Git запоминать логины и пароли для подключения к удаленным репозиториям (например, GitHub, GitLab или корпоративное хранилище) и не вводить их постоянно.
Дополнительные настройки. Кэширование позволит ускорить работу Git, эту опцию рекомендуем оставить. А вот символические ссылки нам не нужны.
Экспериментальные настройки. Эти опции еще не переведены в стабильную стадию, поэтому их использование рекомендуется, только если вы точно понимаете, что делаете. Мы не будем ничего отмечать.
Git установлен и готов к работе.
Установка в различные дистрибутивы Linux
Также коротко покажем, как можно установить Git в различные дистрибутивы Linux. Как правило, самостоятельно скачивать ничего не нужно, достаточно воспользоваться встроенным в дистрибутив пакетным менеджером.
Debian
pt-get install git
Ubuntu
add-apt-repository ppa:git-core/ppa # apt update; apt install git
Fedora 21
yum install git
Fedora 22+
dnf install git
Gentoo
emerge --ask --verbose dev-vcs/git
Arch Linux
man -S git
OpenSUSE
ypper install git
Mageia
rpmi git
FreeBSD
pkg install git
OpenBSD
g_add git
RHEL, CentOS, Oracle Linux и др.
Как правило, пакетный установит довольно старую версию Git, поэтому рекомендуется собирать Git из исходных кодов, или воспользоваться сторонним репозиторием IUS Community.
Первоначальная настройка и создание репозитория
Перед началом работы с Git нужно указать свое имя и email, которые в дальнейшем будут записываться в историю изменений при каждом коммите. В будущем это позволит понять, кто именно внес те или иные изменения.
Откроем любое из приложений — Git Bash или Git CMD. Первое — это командная строка в стиле Linux, второе — командная строка в стиле Windows. Выбирайте то, что вам ближе. Мы выберем Git Bash и выполним две команды:
git config --global user.email "git-user@selectel.ru"
git config --global user.name "Selectel Git User"
Теперь Git полностью готов к работе. Давайте создадим репозиторий и зафиксируем в нем первое изменение (сделаем коммит). Для начала создадим каталог для будущего репозитория и сразу перейдем в него:
mkdir first-repo && cd first-repo
Создаем новый репозиторий в этом каталоге:
git init
Увидим ответ:
Initialized empty Git repository in C:/Users/git_user/first-repo/.git/.
Это означает, что в директории создан новый репозиторий. Далее создадим текстовый файл, назовем его README.md, и напишем в нем любой текст. Но сам по себе этот файл не попадет в следующий коммит. Мы должны проиндексировать изменения, то есть явно сказать Git-у, что этот файл нужно учитывать в следующем коммите:
git add README.md
Далее введем команду:
git commit
Откроется текстовый редактор, который мы выбирали на этапе установки Git. Тут нам нужно ввести комментарий для коммита, то есть кратко описать изменение, которое мы сделали. Мы напишем такой комментарий:
Обратите внимание, что Git автоматически добавил небольшую подсказку в это окно. При этом она не войдет в коммит, потому что в начале строки стоит символ решетки, и Git проигнорирует ее. Но она может быть полезна для дополнительной проверки: мы видим название текущей ветки и список файлов, которые войдут в коммит.
Сохраним файл и закроем редактор. Увидим примерно следующее сообщение:
[master (root-commit) 2b8f7a5] Add readme file
1 file changed, 3 insertions(+)
create mode 100644 README.md
Мы успешно сделали первый коммит.
Работа с Git в визуальном интерфейсе
Сам по себе Git — это утилита командной строки. Но не всем может быть удобно запоминать и писать команды в терминале, поэтому часто разработчики пользуются графическим интерфейсом. Есть несколько вариантов:
- Встроенный GUI. В базовой установке Git есть две простые утилиты: gitk и git gui. Но у них довольно старый интерфейс и пользоваться ими не всегда удобно.
- Отдельные графические утилиты. Они могут быть понятны и красивы, но неудобны тем, что код нужно писать в одной программе, а для работы с Git нужно переключаться в другую. Примеры таких программ: GitKraken, Sourcetree, GitAtomic. Большой список таких клиентов есть на официальном сайте Git.
- Встроенные в IDE или текстовый редактор. В большинстве популярных редакторов кода или IDE уже есть поддержка Git. Как правило, ничего дополнительно настраивать не нужно. Мы рассмотрим именно такой вариант на примере редактора VSCode.
Откроем директорию с репозиторием в редакторе VSCode. Внесите любое изменение в файл README.md и сохраните изменения. Обратите внимание, что в левой части редактора кое-что изменилось:
- Файл README.md подсветился желтым цветом, а рядом с ним появилась буква M (означает Modified — изменен).
- На панели Source Code появилась цифра 1, означающая, что есть одно изменение, которое можно зафиксировать.
Перейдем на панель Source Code. Слева находится список файлов, которые были изменены. Если кликнем на файл, то увидим какие именно изменения мы внесли: в этом случае добавили новую строчку This is the second commit.
Теперь давайте зафиксируем наши изменения. Рядом с названием файла нажмем на «плюс», чтобы проиндексировать его. Это аналогично команде git add, которую мы выполняли ранее. Затем в поле Message внесем комментарий и нажмем кнопку Commit. Это аналогично команде git commit.
Поздравляем, вы сделали уже два коммита в свой репозиторий!
Заключение
Итак, мы рассмотрели процесс установки Git под Windows, рассказали об основных параметрах установки и последующей настройки. Увидели, как репозиторий и внести в него первый коммит. Познакомились с работой в командной строке и с помощью графического интерфейса.
Last Updated :
04 Mar, 2025
Git and GitHub are important tools for version control, which allows developers to track changes, collaborate efficiently, and manage code repositories. Git is a distributed version control system that helps keep track of modifications in files, while GitHub is a cloud-based platform for hosting Git repositories, making collaboration seamless. To use Git and GitHub for version control, you need to install Git on your system.
In this article, we will discuss how to install Git on Windows, Linux, and Mac, along with setting up GitHub for seamless repository management.
Table of Content
- Installing Git on Windows
- Installing Git on Linux
- Installing Git on Mac
- Setting Up GitHub with Git
Installing Git on Windows
We will install git on Windows through the official Git website, which is the easy and most recommended way. The following steps are for installing the git on Windows.
Step 1: Download the Installer
Go to the official Git website: https://git-scm.com/downloads/win
The download will start automatically for the latest version of Git for Windows. After the download is complete, run the .exe file.
Step 2: Select Editor & Adjust Path
Follow the prompts in the setup wizard. Most default settings will be fine for general use, but here are some key steps:
- Firstly, the installer will ask which text editor to use for Git. You can choose from options like Vim, Notepad++, or Visual Studio Code.
- Make sure you choose the option that adds Git to your system PATH (recommended for ease of use in the command line).
- Select the default option (OpenSSL) to allow Git to communicate securely over HTTPS.
- The default choice, “Checkout Windows-style, commit Unix-style line endings,” is ideal for most developers working in Windows environments.
Step 3: Complete the Installation
After configuring the setup, click «Install» and allow the installation to complete.
Once done, you can launch Git Bash (installed with Git) or use Git from the Command Prompt (cmd) by typing the following command.
git --version
If Git is installed, it will display the version number.
Installing Git on Linux
Step 1: Update the System
For Debian/Ubuntu:
sudo apt update
sudo apt install git
For Fedora:
sudo dnf install git
For Arch Linux:
sudo pacman -S git
Step 2: Verify Installation
Use the below command to varify the installation of Git in Ubuntu.
git --version
Installing Git on Mac
Step 1: Get Homebrew in your macOS
If you don’t have Homebrew, then type the following command in the terminal:
/bin/bash -c "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Step 2: Install Brew
We recommend you install Homebrew first and then run the below command to download Git with no errors:
brew install git
Step 3: Verify the Installation
Once the installation is complete, verify the installation:
git --version
Setting Up GitHub with Git
Step 1: Create a GitHub Account
- Visit GitHub and sign up.
Step 2: Configure Git with GitHub
Run the following commands in the terminal (Windows Git Bash, Linux, or Mac Terminal):
git config --global user.name "YourName"
git config --global user.email "youremail@example.com"
Step 3: Generate SSH Key (Optional but Recommended)
ssh-keygen -t rsa -b 4096 -C "youremail@example.com"
- Copy the key:
cat ~/.ssh/id_rsa.pub
- Add it to GitHub > Settings > SSH and GPG keys.
Step 4: Create a New Repository
Now we have successfully setup GitHub in our system.
Getting started with GitHub can be tough. Using Git on the command line can feel daunting, and it’s only natural to yearn for a simple graphical interface 🖥️ rather than odd commands. In this post, we’ll show absolute beginners how to download GitHub GUI for Windows, clone a repo, and push/pull changes.
📋 Contents
- ⚙️ Download & Install Github Desktop
- 🚀 Create and Publish Your First Repository
- ➕ Create, Commit & Push Files with GitHub Desktop GUI
- 📂 Clone a Repo with Github Desktop
Download & Install Github Desktop
1️⃣ Get the Windows Installer
Go to the link for Download Github Desktop and click the download button to begin the process.
2️⃣ Sign in to your Github account
Once the install has launched, you will need to sign in to Github or create an account if you don’t have one already.
3️⃣ Give GitHub Desktop Permission
When the permissions dialog appears, leave the defaults enabled so GitHub Desktop has full access to your public and private repositories. Otherwise, you’ll run into errors trying to clone private repos later. In future it probably isn’t a bad idea to learn about ssh-keys for auth in the event you ever want to clone a private git repo from a server but to keep things simple , we will just tick the defaults shown below.
4️⃣ Configure Github Desktop
Sign in using your GitHub username and email address. This will sync your repositories and settings automatically—honestly not sure what the other settings do, I have never needed them. If you do need to change anything later, head to File → Options
Installation is now complete! 🔥 Hopefully that was pretty easy! You should now see something like the window below with your Github Repos, if you don’t have any yet, read on and we will show how to make your first repo.
Create and Publish Your First Repository with GitHub Desktop GUI
1️⃣ Click on the File Menu on Top Left
Select New Repository ⬇️
2️⃣Give your Repo a Name & Description
Enter a unique name (and an optional description) for your new repo. The Local path setting tells GitHub Desktop where to store your files on your PC—unless you have a specific folder in mind, the default location is fine for now. Click on create repository button once you are satisfied with your choices.
3️⃣Check it is in the local folder
GitHub Desktop will automatically create a GitHub folder in your Documents. To check that the repo we created with the gui exists
➡️ Open 📂 File Explorer
➡️ Go to Documents/GitHub
➡️ You should see the repo you just created in the list
4️⃣Publish from Local Folder to Github
This step is straightforward—click the Publish repository button to upload your local files to GitHub 🤘
If you want to keep your code private, tick the Keep this code private checkbox 🔒
Once that’s done, you’ll find your new repo on your GitHub profile—though it’ll be empty at first! But fear not, in the next step we’ll walk through how to add new files, commit them and push to github —all via the GUI
Create, Commit & Push Files with GitHub Desktop GUI
In this section, we’ll walk through the core Git workflow in GitHub Desktop: create or edit files locally, commit your changes, and push them to the remote repository.
Heads up—you’ll need an code editor installed to follow along with the next steps, I personally use & recommend VS Code as its free and not too painful to set up + works very well with Github Desktop. Notice the Options link below, where you can change the default code editor Github Desktop uses. Then click on the button to open your repo!
1️⃣Create Files
I created a hello_world.py ⬇️
print("Hello, world!")
print("From my first GitHub repo")
And a hello_world.js ⬇️
console.log("Hello, world!");
console.log("From my first GitHub repo");
So my editor currently looks like the image shown below ⬇️
2️⃣Commit Files
This is where the real magic starts! If you go back to the Github GUI , you will see Github Desktop has noticed we made changes to the folder!
➡️Ensure that the files you want to commit have the checkmark ticked beside them ☑️
➡️Add a commit message : In mine shown above I have called it ‘Commit Hello worlds’
➡️Optional Description: Here you can add more details , I just listed the files as shown above.
➡️ Click on the Commit to main button to add the files to version control.
And that’s it, pretty simple right! Now let’s move on to make sure we send the new files to Github.
3️⃣Push Files to Github
This step is a very easy—just click the Push origin button (shown below), and GitHub Desktop will publish the files you committed in step 2 directly to your GitHub repository!
And sure enough they are there along with the commit message we wrote in step 2.
And that’s it for this part. It’s a good idea to practise modifying, committing and pushing a few times, as you’ll be doing this workflow quite often!
Clone a Repo with Github Desktop
Cloning a repository means creating a full local copy of a project hosted on GitHub, so you can browse, edit, and experiment on your own machine. What’s cool about GitHub and open source in general is that you can take someone else’s code, download it directly, and modify it however you like (license permitting, of course).
For this section, we will clone a repo I createed in a post about Deploying a FastAPI app , you can also find the repo here on github
Steps to Clone the Repo
1️⃣ Navigate to Github Repo on Website
To follow along with me My Repo link , or whatever repo you are interested in.
2️⃣Copy the repo URL
3️⃣ Click on File Menu in Github Desktop & Select Clone Repository
4️⃣ Copy Pasting URL from Step 2 in to URL Tab
Click the Clone button—and that’s it! It’s much simpler and cleaner than manually downloading and extracting a ZIP from the GitHub UI.
And sure enough the cloned repo is right beside the one we made in Part 2 of this post!
📚 Further Reading
- 🔗 Run Python Scripts in the Cloud
- 🔗 Install Linux & Docker on Windows
- 🔗 Make a Python Dashboard