DEV Community

Cover image for How create a Local Repository Initialization
Ajayi Daniel
Ajayi Daniel

Posted on

How create a Local Repository Initialization

Initialized Git repository

mkdir website
cd website
git init

website
Step 2 Global Identity Configuration
Configure your global Git profile to ensure all commits are correctly attributed to you.**

  • configure your user name

  • configure your email

email

Step 3 Artifact Creation
Create your first web asset in the local directory.

Creates an empty file named index.html in the current directory using touch index.html

Index file
Step 4 Content Authoring (Vi/Vim)
Open the file in Vim using vi index.html, then press i to enter insert mode so you can edit it directly in the terminal.to paste your information inside either your resume in index format after you have paste your information, you will press esc and shift with semi colum to type wq to enter

CV
Step 5 stages the changes **
**git add index.html moves the file from the working directory to the staging area so it is prepared to be included in the next commit.

git add
Step 6 The First Commit Snapshot
git commit -m "message" saves your staged changes as a permanent snapshot (commit) in Git history with a unique ID and a message describing what was changed.
vim
step 7 Establishing the Cloud Link
git remote add origin connects your local Git repository to a remote GitHub repository by assigning it the name origin, allowing you to push and pull code between your computer and the cloud repository.

push
step 7 Publishing to the Global Stage
git push origin master sends your local commits from the master branch to the remote repository (origin), updating it so others can see and access your latest changes.by pushing to the main branch
push to main
step 8 Live Hosting: GitHub Pages
How to enable GitHub Pages (UI method)
Go to your repository on GitHub (open it in your browser).
Click Settings (top menu of the repo).
On the left sidebar, scroll down and click Pages.
Under Source, select:
Deploy from a branch
Under Branch, choose:
Branch: main or master (whichever your repo uses)
Folder: /(root)
Click Save.
After saving
GitHub will build your site automatically.
You’ll get a live link like:https://ajayid10.github.io/biggy-/

one

deploy

Top comments (0)