Urgent.News

What's breaking now, across thousands of outlets.

Tech

MY FIRST GITHUB PROJECT

Introduction In this article I will explain my practical experience of creating Git repository,connecting it to GitHub using SSH,commiting my files and pushing the project to a remote repository. Step 1 :Creating My Local Project The first step is to create a folder through file explorer which as the best option for me and name it (my-project) Next step was to open GitBash and run the command cd…

In this article, I will detail my hands-on experience of creating a Git repository, connecting it to GitHub using SSH, committing my files, and pushing the project to a remote repository.

Step 1: Creating My Local Project involves making a folder in a file explorer, naming it "my-project". Next, I opened GitBash and navigated to the folder using the command "cd my-project".

Step 2: Initializing Git is crucial to tell Git that the my-project folder should become a Git repository. This is accomplished by running "git init" in the GitBash.

Step 3: Check Repository Status is achieved by using "git status" command. This command helps in understanding what's happening inside the repository. If the status shows "nothing to commit, working directory clean", it implies that there are no changes that need to be committed.

Step 4: Connecting GitHub using SSH is another important step. I learned how to generate an SSH key using the command "ssh-keygen -t ed25519 -C your_email@example.com". After generating the key, I added it to the SSH agent and copied the public key. This key is then added to GitHub under "Settings > SSH and GPG keys > New SSH key".

Step 5: Creating a Repository on GitHub is a straightforward process. I created a new repository, gave it a title and description, set it to public, and clicked "Create repository".

Step 6: Adding Files involves preparing the files and adding changes in the current directory. Using "git add ." command stages all files for the next commit.

Step 7: Create a Commit is the checkpoint in the project where all the changes are saved. The command "git commit -m 'Initial commit'" creates a commit with the message 'Initial commit'.

Step 8: Connecting the Local Repository to GitHub involves adding the remote origin using "git remote add origin" command followed by "git remote -v" to verify the connection. After this, I pushed the project to GitHub using "git push -u origin main".

Through this process, I gained a better understanding of managing a project using a professional development workflow with Git. I came up with a mnemonic - "I See All Commits Reach Big Places" for easy recall of the Git command sequence: "git init", "git status", "git add .", "git commit", "git remote add origin", "git branch -M main", and "git push -u origin main".

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

Token Budget Alarm on a Free Server

A free model quota is a budget, not a gift. You should treat it like one if you plan to build anything on top of it. I learned this the hard way when my prototype stopped responding in the middle of a…

  • Free model quota is a budget, not a gift
  • Token budget alarm monitors usage and alerts before exhaustion
  • Flask proxy records usage and sends webhook alerts

How to Build a Local-Service Site That Can Answer ‘Can You Fix My RV Today?’

An RV repair business does not lose a service call because a visitor failed to read a clever headline. It loses the call when a person with a broken slide-out, roof leak, or electrical issue cannot…

  • Focus on key questions: service capability, location, availability, credibility, and next steps.
  • Implement single source of truth and decision surfaces for consistent, crawlable data.
  • Store critical information like phone number, service coverage, and hours in one domain object.

US battery startups have found a lifeline in defense

U.S. battery startups pulled in $500 million in grants from the Department of Energy, throwing a lifeline to an industry that was on the ropes after EV incentives were slashed.

  • US battery startups seek defense sector support after EV incentives cut
  • DOE grants $500 million to strengthen US battery supply chain
  • Defense applications for lithium-ion batteries being actively considered

More from Saturday 22 August →