From f51f9b3493f995564dff0f33a29f2bf8a65b2b04 Mon Sep 17 00:00:00 2001 From: Codewithnextlabel Date: Sat, 26 Jul 2025 17:58:51 +0530 Subject: [PATCH 01/15] add Readme.md file --- Readme.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 Readme.md diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..c9f9873 --- /dev/null +++ b/Readme.md @@ -0,0 +1 @@ +# NetworkingInOneShot From e63ebc4a97fefef650a5e2e490b24a6fd7c5006a Mon Sep 17 00:00:00 2001 From: MRIGENDRA KUMAR GUPTA Date: Tue, 5 Aug 2025 11:14:10 +0530 Subject: [PATCH 02/15] Create Fundamentals.md Some lines added --- Git & Github Advanced/Fundamentals.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Git & Github Advanced/Fundamentals.md diff --git a/Git & Github Advanced/Fundamentals.md b/Git & Github Advanced/Fundamentals.md new file mode 100644 index 0000000..0d8875d --- /dev/null +++ b/Git & Github Advanced/Fundamentals.md @@ -0,0 +1,9 @@ +# Fundamentals +```git +git --version //for checking version +Example: git version 2.43.0 + +cd scripts //for changing directory + ls // view directories and files + rm // for remove dir + git init // file or directory ---> to ---> version control system (git) From f28285e189ac8c3bf8f4f7a9e7823d0b4b69df67 Mon Sep 17 00:00:00 2001 From: MRIGENDRA KUMAR GUPTA Date: Tue, 5 Aug 2025 11:47:43 +0530 Subject: [PATCH 03/15] Update Fundamentals.md --- Git & Github Advanced/Fundamentals.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Git & Github Advanced/Fundamentals.md b/Git & Github Advanced/Fundamentals.md index 0d8875d..44b9448 100644 --- a/Git & Github Advanced/Fundamentals.md +++ b/Git & Github Advanced/Fundamentals.md @@ -7,3 +7,9 @@ cd scripts //for changing directory ls // view directories and files rm // for remove dir git init // file or directory ---> to ---> version control system (git) +git status // check file condition : untracked or tracked or commited +git add ./ // for stagged (green) +git rm --cached // for unstage ( green --> red) +git commit -m "Addec Readme.md" // for save your file in directory +git restore readme.md // for backup deleted file in your repository, but without git init directory is not work command line but you can restore from recyclebin + From 5026fd8bb80614055c763604c104a6de16a07452 Mon Sep 17 00:00:00 2001 From: MRIGENDRA KUMAR GUPTA Date: Tue, 5 Aug 2025 12:09:24 +0530 Subject: [PATCH 04/15] Update Fundamentals.md --- Git & Github Advanced/Fundamentals.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Git & Github Advanced/Fundamentals.md b/Git & Github Advanced/Fundamentals.md index 44b9448..9569aa6 100644 --- a/Git & Github Advanced/Fundamentals.md +++ b/Git & Github Advanced/Fundamentals.md @@ -5,11 +5,19 @@ Example: git version 2.43.0 cd scripts //for changing directory ls // view directories and files - rm // for remove dir + rm // for remove file git init // file or directory ---> to ---> version control system (git) git status // check file condition : untracked or tracked or commited git add ./ // for stagged (green) git rm --cached // for unstage ( green --> red) git commit -m "Addec Readme.md" // for save your file in directory git restore readme.md // for backup deleted file in your repository, but without git init directory is not work command line but you can restore from recyclebin +git restore --staged readme.md // for unstage +git config --global user.name "technical Asthavi" // add user name of your repository +git config --global user.email "technicalasthavi@gmail.com" // add user email of your repository +clear // clear windows terminal commands +history // terninal give you all command list that you have uses in terminal + + + From 0c27b3e3a2674f3fdb15c4f5464665f219a717b0 Mon Sep 17 00:00:00 2001 From: MRIGENDRA KUMAR GUPTA Date: Tue, 5 Aug 2025 14:08:47 +0530 Subject: [PATCH 05/15] Update Fundamentals.md --- Git & Github Advanced/Fundamentals.md | 38 ++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/Git & Github Advanced/Fundamentals.md b/Git & Github Advanced/Fundamentals.md index 9569aa6..acbbb4c 100644 --- a/Git & Github Advanced/Fundamentals.md +++ b/Git & Github Advanced/Fundamentals.md @@ -17,7 +17,43 @@ git config --global user.name "technical Asthavi" // add user name of your repos git config --global user.email "technicalasthavi@gmail.com" // add user email of your repository clear // clear windows terminal commands history // terninal give you all command list that you have uses in terminal - + Note : if You have not available file for commit,Your Terminal says to you: " Your working tree is clean" +cd .. // for child directory to parrent directory +Note : if you have not uses git init command in directory , Terminal says : fatal: not a git repository (or any of the parent directories): .git +git branch // to see branches and * (star) is indicate you You are working here. +git checkout -b Dev // for Switched to a new branch "Dev" name +-----when you put command under Dev (Branch) : git status // Terminal say : On Branch Dev nothing to commit, working tree clean. and (-b ) use for new branch create. +-----ls // your all dir/file see in subdirectory (Dev) or main files or dir copy to Dev branch +-----vim from_Dev.txt --> This is a file in the Dev Branch -->esc --> :wq --> Back to Terminal +-----git status // On Branch dev from_Dev.txt --> untracked +------git add from_Dev.txt //stages --> git commit -m "added Dev file" --> + Next : --> git branch // to see branch + ex: *Dev + master +git checkout master// to move main branch // branch is a seperate line of branches +Note : sub branch is not copy your dir or file when you want to move parrent branch(master) +git log --oneline // to see comment list with id and massages +and (HEAD -> master) is notify to you : you have recently added this commit + + +git checkout dev // to switched dev branch +or +git switch Dev // to switched dev branch + +git checkout -b staging // for create new branch (name = staging) and moved to new branch Staging + +for mergging branch : + +git merge dev // dev branch copy folder -- to -- master branch // that means main branch update by Dev Branch for commitable file // sure ! before this changes you must to switched master branch then try it. + +Access +1. Personal Access Token +2. SSH + +git remote -v // to varify your git repository is connected to GitHub // if yes : see in Terminal // if no: terminal give no any information. that means black . + + + From efc035487cfcc58941522d22b7b32a7a74e9b10b Mon Sep 17 00:00:00 2001 From: MRIGENDRA KUMAR GUPTA Date: Tue, 5 Aug 2025 14:52:55 +0530 Subject: [PATCH 06/15] Update Fundamentals.md --- Git & Github Advanced/Fundamentals.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Git & Github Advanced/Fundamentals.md b/Git & Github Advanced/Fundamentals.md index acbbb4c..5b5f26d 100644 --- a/Git & Github Advanced/Fundamentals.md +++ b/Git & Github Advanced/Fundamentals.md @@ -53,7 +53,20 @@ Access git remote -v // to varify your git repository is connected to GitHub // if yes : see in Terminal // if no: terminal give no any information. that means black . +git remote add origin // for stablish connection with git Terminal to Github Repository - +again + +git remote -v // for see connection : + output : origin (fetch) + output : output : origin (push) + +git status +// on branch master +// nothing to commit, working tree clean + +git push origin master +// userrname for 'https://github.com' : +// password for 'https://https://@github.com : From 2c847500fdcaab6de0df47b965b11e8422b5f2a2 Mon Sep 17 00:00:00 2001 From: MRIGENDRA KUMAR GUPTA Date: Tue, 5 Aug 2025 16:12:22 +0530 Subject: [PATCH 07/15] Update Fundamentals.md --- Git & Github Advanced/Fundamentals.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Git & Github Advanced/Fundamentals.md b/Git & Github Advanced/Fundamentals.md index 5b5f26d..c41ad9f 100644 --- a/Git & Github Advanced/Fundamentals.md +++ b/Git & Github Advanced/Fundamentals.md @@ -66,7 +66,26 @@ git status // nothing to commit, working tree clean git push origin master -// userrname for 'https://github.com' : -// password for 'https://https://@github.com : +// username for 'https://github.com' : put user name +// password for 'https://https://@github.com : put here personal acess token +git remote -v // // for testing GitHub is connected with git +git remote set-url origin https://@github.com/username/repository name here.git // for many time use , no need to next time even use user name and password or don't ask you terminal nest time username and password. +clear// +git push origin master +// * [new branch] master -> master +// pushes Done by git on GitHub repository +########################################## + + +git pull origin master // github data to git that is called pull from master github + +for git hub push : +vim from_local.txt +git add from_local.txt +git commit -m "added from local" +ls +git branch +git push origin master +// master -> master and From f51837d991e5f8322fcf55cda9e4deeed9115fcd Mon Sep 17 00:00:00 2001 From: MRIGENDRA KUMAR GUPTA Date: Wed, 6 Aug 2025 09:25:45 +0530 Subject: [PATCH 08/15] Update Fundamentals.md --- Git & Github Advanced/Fundamentals.md | 134 +++++++++++++++++++++++++- 1 file changed, 132 insertions(+), 2 deletions(-) diff --git a/Git & Github Advanced/Fundamentals.md b/Git & Github Advanced/Fundamentals.md index c41ad9f..799937a 100644 --- a/Git & Github Advanced/Fundamentals.md +++ b/Git & Github Advanced/Fundamentals.md @@ -81,11 +81,141 @@ git push origin master git pull origin master // github data to git that is called pull from master github -for git hub push : +for github push : vim from_local.txt git add from_local.txt git commit -m "added from local" ls git branch git push origin master -// master -> master and +// master -> master + +//Note : git pull is not use in another person repository because you should token of his repository. + +git remote -v // test +git clone +ssh-keygen // generating public/private ed2...9 key pair (for pair my repository to Another person repository) +//Enter file in which to save the key (/home/ubuntu/.ssh/id_ed25519): enter press then +/home/ubuntu/.ssh/id_ed25519 already exists. +Overwrite (y/n)? ^c (Ctrl + C) +cd .ssh +ls +authorized_key id_ed25519 id_ed25519.pub know_hosts known_hosts.old + +.ssh$ cat id_ed25519 +-----Begin openssh private key----- +aghshhshh...70(case form) +jsjhshshjbshshshsh..70 (case form) +aghshhshh...70(case form) +jsjhshshjbshshshsh..70 (case form) +aghshhshhhshhshehhdhdhdhjddh +-----End openssh private Key------- + +ssh$ ls +authorized_key id_ed25519 id_ed25519.pub know_hosts known_hosts.old + +ssh$ cat id_ed25519.pub +ssh-id25519 GSKGKGSKSKGKGDKGSKSKDGKDGKGKSGKS +A ubuntu@ip-172-31-34-159 // copy this code go github > profile> ssh and GPG KEYS >NEW SSH KEY: +TITLE: ANYNAME EX:BATCH-9-SERVER-KEY +KEY TYPE : ATHENTICATION +KEY : PASTE HERE YOUR COPY 🔑 KEY (EX: ssh-id25519 GSKGKGSKSKGKGDKGSKSKDGKDGKGKSGKS +A ubuntu@ip-172-31-34-159) + >Add ssh key +>go terminal: +ls +mkdir github_repo +cd github_repo/ +ls + +go github> choose and copy any person repository url (ssh ) +>go terminal: +git clone git@github.com:LondheShubham153/90DaysOfDevOps.git + +yes + +ls + +cd 90DaysOfDevOps +ls +vim Readme.md +😊 you 💘 +git status +o/p > on branch master +git diff// for changing in document +git add Readme.md +git status +git commit -m "added some changes" +git push origin master + + +# abhi hamne sikha ki kaise dusare ke repository ko clone kar sakte hai + +aayiye jante hai ki +2:07:39 + +github to github fork kiya jata hai clone karne ke liye + +repository choose kar le pahle + +git clone origin master //for self + +and that choose any file for modify +ex: Readme.md + +vim readme.md +this is readme file +esc +:wq + +git status +Readme.md (Red : Untracked file) + +//that i am want to not push on github main branch so that i make another branch name any that you want you. +// why we make another branch because my Readme file is not professional way +//my readme file is look like Rough or simple tipe + + git checkout -b networking +git add . + +make a file .gitignore for not want to publish on github Repository, or i don't want to push on github repository + +vim .gitignore +.Ds_store + +>exit +git commit -m "added networking solution" +git push origin networking //networking is a subbranch + +//but you can push with this method. + +// you can put token on .gitignore file + +## What SHOULD be in version Control? +1.Unit Tests +2.Build Scripts +3.Source Code +4.Documentation +5.Database Schema +6.Configuration files +7.Deployment Script +8. Kubernetes manifests +9. Docker and compose files +10.Infrastructure as Code (IaC) Files +11.Dependency Lock Files: e.g, package-lock.json + + +## What should Not be in Version Control? +1.Logs +2.Secrets +3.Build Artifacts +4.Large Binary Files +5.IDE or OS-Specific Files +6.Temporary or Cache Files + +//Use Git tags to mark versions so you can navigate back or forth as needed. + +Remember: Version control isn't about tracking code--it's a Blueprint of Entire Application. + + + From bf697d0e65af5e05a28644e5d7d80e0adcbf98b6 Mon Sep 17 00:00:00 2001 From: MRIGENDRA KUMAR GUPTA Date: Wed, 6 Aug 2025 17:03:15 +0530 Subject: [PATCH 09/15] Update Fundamentals.md --- Git & Github Advanced/Fundamentals.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Git & Github Advanced/Fundamentals.md b/Git & Github Advanced/Fundamentals.md index 799937a..4143b90 100644 --- a/Git & Github Advanced/Fundamentals.md +++ b/Git & Github Advanced/Fundamentals.md @@ -217,5 +217,27 @@ git push origin networking //networking is a subbranch Remember: Version control isn't about tracking code--it's a Blueprint of Entire Application. +terminal: +man git // for all git command list + +# Branching Strategy #1 +master/main // default Branch +// production branch +production = master +testing = staging branch +Development = Dev Branch +Features = Feat /for new member +Features🔀 >Development✳️ >testing♻️ >production✅️ + +merge another branch for push Best Quality code + +master can create another branch for Error code/ notFix + +notFix can merge with master and staging. +Dev merge by staging, +staging merge by Feature branch + + + From 8e7600525b125b35cccaf77d69310eaa60db3e7a Mon Sep 17 00:00:00 2001 From: MRIGENDRA KUMAR GUPTA Date: Wed, 6 Aug 2025 18:46:55 +0530 Subject: [PATCH 10/15] Update Fundamentals.md --- Git & Github Advanced/Fundamentals.md | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/Git & Github Advanced/Fundamentals.md b/Git & Github Advanced/Fundamentals.md index 4143b90..4ec994a 100644 --- a/Git & Github Advanced/Fundamentals.md +++ b/Git & Github Advanced/Fundamentals.md @@ -237,6 +237,46 @@ notFix can merge with master and staging. Dev merge by staging, staging merge by Feature branch +Jira Tool : +git branch +git fetch /all branch list +git checkout -b git-challenge + +cd 2025 +cd git +vim Readme.md +week 3 challenge on Git +exit +git add Readme.md +git commit -m "TWS-9 added git challenge" +git push origin git-challenge + +on github + +90DaysOfDevOps/2025/git/ +Readme.md: +Week Challenge on Git + +compare pull Request with master and git-challenge + +give title : TWS-9(Jira Ticket Id) added git-challenge + +but not click on merge button + + +#merge means // pull Request in github + +## This is professional way git learn + +git rebase// isme commit history time ke according linear way mentain karti hai +वह rewrite kar deta hai apke commit history ko +//isliye rebase bahut kam use hota hai + + + +git merge// isme commit history ko utal putal kar deta hai + + From 220b9c39bb94e91f6ff4c42ccd8062d7cbbaa4b6 Mon Sep 17 00:00:00 2001 From: MRIGENDRA KUMAR GUPTA Date: Thu, 7 Aug 2025 09:33:43 +0530 Subject: [PATCH 11/15] Create Git & Github Advanced.md --- Git & Github Advanced/Git & Github Advanced.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Git & Github Advanced/Git & Github Advanced.md diff --git a/Git & Github Advanced/Git & Github Advanced.md b/Git & Github Advanced/Git & Github Advanced.md new file mode 100644 index 0000000..9e46233 --- /dev/null +++ b/Git & Github Advanced/Git & Github Advanced.md @@ -0,0 +1,18 @@ +# GitHub Advanced +* Pull Requests = merge Request +* Revert & Reset +* Stashing +* Cherry-Picking +* Rebasing +* Branching Strategies used in Companies + +## Theory start Here: +Launch instance: +in Aws Ec2: + + +''git is version control system +founder of linux is create git'' +git merge dev + + From de6daedd40d3601cbf64341aca860da076381b5a Mon Sep 17 00:00:00 2001 From: MRIGENDRA KUMAR GUPTA Date: Thu, 7 Aug 2025 10:49:23 +0530 Subject: [PATCH 12/15] Create Realese.md --- Git & Github Advanced/Realese.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 Git & Github Advanced/Realese.md diff --git a/Git & Github Advanced/Realese.md b/Git & Github Advanced/Realese.md new file mode 100644 index 0000000..9862cac --- /dev/null +++ b/Git & Github Advanced/Realese.md @@ -0,0 +1 @@ +This is a Realese File From 29d8e3ce9aa49653f584250bf3f724bb9c35afdb Mon Sep 17 00:00:00 2001 From: MRIGENDRA KUMAR GUPTA Date: Thu, 7 Aug 2025 18:23:46 +0530 Subject: [PATCH 13/15] Update Git & Github Advanced.md --- .../Git & Github Advanced.md | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/Git & Github Advanced/Git & Github Advanced.md b/Git & Github Advanced/Git & Github Advanced.md index 9e46233..8f92705 100644 --- a/Git & Github Advanced/Git & Github Advanced.md +++ b/Git & Github Advanced/Git & Github Advanced.md @@ -1,6 +1,6 @@ # GitHub Advanced -* Pull Requests = merge Request -* Revert & Reset +* Pull Requests = merge Request🔄 +* Revert & Reset🔄 * Stashing * Cherry-Picking * Rebasing @@ -15,4 +15,37 @@ in Aws Ec2: founder of linux is create git'' git merge dev +pull request ✅️ +Revert & Reset // is just like undo commit or wrong commit +git log --oneline // to see all commit +git revert +git commit -m "some changes on commit" +again give conflict massage change some in file +using vim + +git revert --continue //fix conflict and run command line + +git revert --skip // to skip this patch⚠️ +git revert --abort // to cancel the revert operation⚠️ + + +git reset + +git restore --staged + +git stash & pupping + +git Stashing list + +git stash pop 0 + +git cherry-Pick + +git rebase dev + + + + + + From bfb3778fc88f0a52d0d55dbe02a593d3a8dfc5bc Mon Sep 17 00:00:00 2001 From: MRIGENDRA KUMAR GUPTA Date: Fri, 8 Aug 2025 11:29:29 +0530 Subject: [PATCH 14/15] Update Git & Github Advanced.md --- .../Git & Github Advanced.md | 130 ++++++++++++++++++ 1 file changed, 130 insertions(+) diff --git a/Git & Github Advanced/Git & Github Advanced.md b/Git & Github Advanced/Git & Github Advanced.md index 9e46233..87656c3 100644 --- a/Git & Github Advanced/Git & Github Advanced.md +++ b/Git & Github Advanced/Git & Github Advanced.md @@ -16,3 +16,133 @@ founder of linux is create git'' git merge dev +## Git & Github CheatSheet + +### Repository management + + +| Command | Description | +| ------------- | ------------- | +| Git init | Intialize a new repository | +| git clone // Link local repo to remote +Adding and community: +git add //stage changes for commit +git add . // stage all changes +git commit -m "message" //commit changes with a message +git commit --amend // edit the last commit + +Branching and Merging: + git branch //List Branches + git branch // create a new branch + git checkout -b // create and switch to a new branch + git merge // Merge a branch into current branch + git branch -d Delete a branch + git Checkout // Switch to a branch + + Log and History: + + git log //view commit history + git log --oneline // view commit history in one line + git diff // view unstaged changes + git diff HEAD //compare working directory to HEAD + +Undo changes: + +git reset unstages a file Changes remain in the working directory +git restore //Restores a file to its last committed state +git reset --hard //Resets the current branch to the specified commit and discords all local changes. +git revert Create a new commit that undoes a previous commit + + +Pushing and pulling : + +git push origin // Push changes to the remote repository +git pull origin // Pull changes from the remote repository + + +Log Git Config command : + +git config --global user.name "" //Sets the global username for git commits. +git config --global user.email "" //Sets the global email for git commits. +git config --list // Display the current Git configuration (User details, editor, etc) + +Git Status command: + +git status // Shows the current status of the working directory and stagging area, indicates tracked, modified , untracked , or staged files + +Git Fetch Command: + +git fetch // downloads commits files and references from a remote repository without merging them into the local branch. + + +# Advanced Commands + +Stashing Command: + +git stash // Save changes to a Stash +git stash list //List all stashes +git stash apply //Apply the lost stash +git stash drop //Delete the last stash + +Rebase and Cherry-Pick: + +git rebase //Reapplies commits on top of another base branch. It rewrite history. so avoid using it on shared branches. + +git rebase -i //Allows you to rebase interactively from a specific commit. + +git rebase --abort // Aborts the rebase process and returns to the state before starting the rebase + +git rebase --continue //continues the rebase after resolving conflicts + +git rebase --skip // Skips the current commit during rebase. + +git cherry-pick Applies a specific commit from another branch to the current branch. + +Tagging: +git tag // Create a lightweight tag + +git tag -a -m "msg" //Create an annotated tag + +git push origin --tags // Push tags to remote + + +Git Bisect Command (Debugging to find Bad commits): + +git bisect start // Begins the binary search to find the commit that introduced a bug. + +git bisect good //marks a known good commit (does not contain the bug) to start the bisecting process + +git bisect reset //Ends the bisect process and resets the repository to the original state. + +collaboration commands: +git blame //Shows who modified each line of the file. +git shortlog // summarizes contributions by author +git log --graph //visualize branch history +git show // Displays details of a specific commit +git diff --staged // Show differnce between staged changes and the last commit + +# GitHub push Methods: +1. SSH Method: +--1.Generate on SSH key: + using: "ssh-keygen" + +--2.Copy the SSH key: + using: 'cat ~/.ssh/.pub' +3. + + + + + + + + + From 9c7ca8e028cf14aa2aeeee376e0453e7a0dc8d29 Mon Sep 17 00:00:00 2001 From: MRIGENDRA KUMAR GUPTA Date: Fri, 8 Aug 2025 20:01:59 +0530 Subject: [PATCH 15/15] Update Git & Github Advanced.md --- .../Git & Github Advanced.md | 91 ++++++++++++++++++- 1 file changed, 88 insertions(+), 3 deletions(-) diff --git a/Git & Github Advanced/Git & Github Advanced.md b/Git & Github Advanced/Git & Github Advanced.md index 7d51f45..407b8ae 100644 --- a/Git & Github Advanced/Git & Github Advanced.md +++ b/Git & Github Advanced/Git & Github Advanced.md @@ -1,3 +1,6 @@ +**Start Here:** + +```markdown # GitHub Advanced * Pull Requests = merge Request🔄 * Revert & Reset🔄 @@ -165,11 +168,93 @@ git diff --staged // Show differnce between staged changes and the last commit # GitHub push Methods: 1. SSH Method: --1.Generate on SSH key: - using: "ssh-keygen" + using: `ssh-keygen` --2.Copy the SSH key: - using: 'cat ~/.ssh/.pub' -3. + using: `cat ~/.ssh/.pub` + +--3.Navigate to Github > Settings > SSH and GPG keys> New SSH key. + +--4.Paste the key and save. + +--5.Verify the SSH connection: + using: `ssh-T git@github.com` + +--6.Now clone the repo using ssh and do whatever you want and add & commit the changes + +--7.Push code: + using:`git push origin main` + +# 2.HTTPS Method +--1.Firstly Generate a Personal Access Token +--2.Use HTTPS URL for your repository: + `git remote set-url origin https://@github.com//.git` +--3.Add and commit the changes +--4.Push code: + `git push origin main/master` + + # Helpful Github Tips: + + ## Create Pull Request: + 1.Push branch to github. + 2.Open the repository on Github. + 3.Go to the "Pull Requests" tab and click "New Pull Request" + 4.Select branches and create PR. + + GitHub Fork and Sync Workflow : + + 1. Fork a Repository: + a. Go to the repository on github and click on Fork. + + 2. Clone the Fork: + a.`git clone https://github.com/your-username/repo-name.git` + 3. Sync changes from Upstream: + a.git remote add upstream https://github.com/original-owner/repo-name.git + b.git fetch upstream + c.git merge upstream/main + +# Git Aliases : +Speed up your workflow by aliases: +1. git config --global alias.co checkout +2. git config --global alias.br branch +3. git config --global alias.ci commit + +# GitHub Actions: +.Significance: Automates workflows like testing, building and deploying code. +.Example: +```yml Start here: +name: CI/CD Pipeline #Name of the workflow +on: + push: #Triger workflow on push to main branch. + branches: + - main + pull_request: + branches: + - main +jobs: + build: #Define a job name 'build' + runs-on: ubuntu-latest # Use the latest Ubuntu environment +steps: + - name: Checkout Code + uses: actions/checkout@v2 + - name: Install Dependencies + run: npm install + - name: Run Tests + run: npm test + +```Markdown + +# References: + - Git Documentation + - GitHub Docs + + + + + + + +