0% found this document useful (0 votes)
11 views1 page

Test 2

The document provides a series of Git commands for configuring user settings, managing repositories, and handling branches. It includes instructions for cloning a repository, checking status, staging changes, committing, pushing, pulling updates, and creating new branches. Additionally, it explains the purpose of each command in the context of version control and collaboration on GitHub.

Uploaded by

raagulking123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

Test 2

The document provides a series of Git commands for configuring user settings, managing repositories, and handling branches. It includes instructions for cloning a repository, checking status, staging changes, committing, pushing, pulling updates, and creating new branches. Additionally, it explains the purpose of each command in the context of version control and collaboration on GitHub.

Uploaded by

raagulking123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

git config --global user.

name "NaveenKumarThirugnanam"
//User name
git config --global user.email "naveenkumar.t2022ai-ml@sece.ac.in"
//email id
git clone https://github.com/NaveenKumarThirugnanam/Sample.git
//The link is called origin of the repository
cd Sample
//To change the file
git status
//to Check status
git add test2.txt
//add it to stage
//add means it not to add a file it means modified or deleted file is brought to
staging area
git commit -m "Test2.txt file added"
//to save changes to the local file
git push origin main
//upload it in origin in main branch
git pull
//it is used get the updated data from the main repository to the local
git init
//initialize empty repository
git add .
//it brings all the file to the stage area
cd ..
// can be used to move to previous folder
git remote add origin https://github.com/NaveenKumarThirugnanam/second.git
//it is used to add new change to new repository
git branch
//can be used to checK the branch name
git branch -m main
//can be used to change the branch name
git branch -a
//can be used to check all the branch in the repository
git checkout gitbranch1
//used to change branch from one branch to another
git diff gitbranch1
//used to find the difference between the curent branch and the given branch
git merge gitbranch1
//used to merge gitbranch1 to the current branch
clear
//can be used to delete all the previous command
git branch newbranch2
//can be used to create a new branch named newbranch2
//if we didn't have the access to the main branch we can create pull request from
the git hub to merge the branch
git pull origin main
//can be used to pull from main branch to another branch

insert -> add -> commit -> push

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy