Git/GitHub Workflow in 80 seconds

Git/GitHub Workflow in 80 seconds

Resources to bridge the command gap shown in the video.

Yahya Abulhaj's photo
Yahya Abulhaj
ยทJul 29, 2022ยท

3 min read

Subscribe to my newsletter and never miss my upcoming articles

Play this article

Table of contents

  • From Linux to today
  • Set up your Git Terminal
  • 82 Seconds Workflow๐Ÿ˜†
  • Prerequisite
  • Get Started Workflow

This article began with the intention of demonstrating that Git and GitHub are not the same thing.

From Linux to today

Linux has revolutionized using only the command line, as evidenced by the fact that the user interface we have today as a default was only a feature available to administrators a decade ago and scarcely employed.
Mastering the command line is one of the most powerful things you can do.

Set up your Git Terminal

After installing Git

1- Get Git to know you

Run the following commands.

  • git config --global user.name "FIRST_NAME LAST_NAME"
  • git config --global user.email "[email protected]"

2- Get Secured (Public Key)

This step varies from repo hoster to another, but it is mostly the same. You must generate a public key from your local terminal and save it to your repository hoster.

Run the following commands.

  • ssh-keygen -t rsa -b 2048 -C "[email protected]"

    Click Enter instantly => Type parraphrase Twice => Done!

Now copy the Pk using this command(windows):

Perfect, GO to your repo hoster and paste the SSH key, along with a descriptive name! For further details, you can consult the excellent GitLab documentation.

Note For an improved algorithm you can run the following commands then copy again.

82 Seconds Workflow๐Ÿ˜†

I've included a brief video describing the Git/GitHub workflow.
Please read the information provided below to make the most of it.

Prerequisite

Linux Commands

  • mkdir <FolderName>: Stands for Make a Directory, create a new folder.
  • cd <FolderName>: Move to the below folder.
  • pwd: Where am i? Print the working directory.
  • ls: What is in the current folder?.
  • touch <filename>: Create a new file.

more Linux Commands

Git

What is Git

Git is the most popular version control system. It keeps track of the changes you create to files so you can go back in time if required. It also aids collaborative efforts by enabling various people's changes to be merged into a particular source code.

So What is a Git Repository

It's simply a location where you keep and store your git belongings locally. Allowing the creation of a history over time.

Git commands

What's GitHub ?

  • git init: Initizalize your local git repository.
  • git add <filename> : add the files/changes to the git repository
  • git add . : Add all of the files and changes in the directory to the git repo
  • git commit -m "Your amazing message here" : Before pushing, commit changes.
  • git remote add origin <URL from your repository's hosting service>: Connect your local git repository to a remote hosting repository such as github, gitlab, or any other.
  • git push -u origin <ur branch name>Go ahead and push your great stuff!

More Git Commands

Get Started Workflow

  • Navigate to the desired directory using cd
  • Once you've arrived, make a project folder with mkdir
  • Transmit to the new project using cd
  • Create the files you want once you are there by using touch
  • code . to edit your work in VS Code, save it, and then return to the terminal
  • Create your git repository using git init
  • Add your current files to the git repository git add .
  • It's time to commit your modifications by using the git commit
  • Connect your git repository to the external repository git remote
  • Push and observe the magic.

Big things happen of a simple start. Get your workflow on, create your inspiration, and show it off.

Bonus, each project should include a README file as a best practice.

ย 
Share this