Urgent.News

What's breaking now, across thousands of outlets.

Editions

Tech

My First GitHub Project: From a Local Folder to GitHub Using Git and SSH

Installation And Setup Of Relevant Environments And User Accounts Creation We begin the project by downloading Git bash from Git Website website and installation of the downloaded software. We proceed to create an account by signing up on Github . We then proceed to configure and initialize username and e-mail address on Git bash by running git config command so that the identity of the user is…

To embark on this GitHub project, the first step was to download and install Git Bash from the GitHub website. Following installation, a user account was created on GitHub, where the username and email address were configured using the `git config` command to ensure the user's identity was accurately set up.

The process then moved towards establishing an SSH key for secure authentication when pushing the project from the local machine to the GitHub repository. This was accomplished by generating an SSH key with the command `ssh-keygen -t ed25519 -C`. The generated key was then copied and added to the GitHub account under the SSH and GPG Keys section. Once authenticated, a test connection was performed by entering a verification message sent to the registered email, which, if successful, returned a "success" message.

Utilizing Git Bash as the command-line interface, project folders and files such as Data, README.md, and scripts were created using `mkdir` and `touch` commands. Working on the README.md file could be done using either the `nano` or `echo` commands, with `nano` opening a separate working area for documentation and `echo` running within the Git Bash terminal.

Committing changes was achieved using the command `git commit -m`, which documented the saved changes and provided clarity on the project's history. The project's history could be viewed using `git log`, while the current branch was displayed with `git branch` or `git main`, indicating the location and saved state of the project.

To connect the project to GitHub, a new repository was created by clicking the '+' button and selecting "New Repository," where the project was given a name. The project was then pushed to GitHub by running `git remote add origin git@github.com: followed by the GitHub username`. This established a communication channel between the local project and GitHub, enabling the upload of the project files.

The final step in the project was verifying the upload by refreshing the GitHub page. If the upload was successful, the various files and folders would be displayed on the GitHub Repository, marking the completion of the project's transfer from a local folder to GitHub.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Thursday 20 August →