Test 2
Test 2
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