Urgent.News

What's breaking now, across thousands of outlets.

Tech

# MY FIRST GITHUB PROJECT: FROM A LOCAL FOLDER TO GITHUB USING GIT AND SSH.

What is git and github Git is a command line tool used to create project folders and files that can be linked to your github account repositories. Github is a website where you put all your projects folders and files to enable collaboration with you team or anyone who can contribute to that project. Repository is a project folder that contains all of your project files. Creating A Folder And…

Git and GitHub are two tools that work together to help developers manage project folders and files, as well as enable collaboration with teams or individuals. Git is a command line tool used to create project folders and files, while GitHub is a website where these folders and files can be stored.

To start, a folder is created on the desktop using GitBash, a command line interface for Git. The current directory is verified, and then a new folder is created with a specific name. Within this folder, a file, such as app.py or README.md, is created and written with relevant information. The contents of the file are then displayed, and the user is returned to the previous folder they were in.

Next, the process moves to pushing the repository to GitHub. Using GitBash, the user initializes a Git repository, checks its status, adds the file to the repository, and commits the changes with a message. The user then checks the commit history to ensure the message is correct and confirms they are on the main branch. The GitHub account is accessed, a new repository is created with a name and description, and the SSH URL is copied.

Returning to GitBash, the user navigates to the correct folder and adds the remote origin using the copied URL. The remote repository is listed, and the changes are pushed to GitHub. The user is prompted to enter their password for the GitHub account, and upon successful completion, they are informed that the folder has been pushed to GitHub. The user can then log in to their GitHub account, refresh the page, and see the created folder and files in the repository.

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 Saturday 22 August →