Git and Github

 git init :- to initilise the commuit 

git status :- status check karna ka lia 

git add (then file name) :-  git add sa hum file add karsakta haa git add file ka name 

ls :- check karna ka lia 



git add sa phela wo stage pe ata haa 

then we have git commit for committing 

git commit -m "initial commit"

//git add file name ka bade git commit -m "initial commit" karna padta haa 

cmd + k / clear     //clear karna ka lia


git log :- Git log is a utility tool to review and read a history of everything that happens to a repository.


git add .  karna sa sari file staging area mae ajaying ge

git log will show all commites 

git checkout 15ebcb8e1d62939377b5a2444ecd807e305a681e (has commit wala )

particular commit ko check karna ka lia 

git checkout master           //pura wapas ajaya ga 

git branch    // particular branch pe chala jaya ga 


branch 



git checkout -b bip/multiply              with the help of this we can add new branch 

git checkout dev                             to ya dev wala branch mae switch ho jaya ga 

dev wala branch mae jana ka bade 

git merge <branch ka name >                  or   git  merge bip/multiply    add ho jaya ga pura new code                                                                                        dev     mae  


.gitignore                          //file ko secrate rakhna ka lia    koi track nahi kar paya ga 

                                           react source ka nich file 

or touch .gitignore    in compiler 


GitHub :- 

git remote -v             //to check the push and pull part

git branch -M main
git push -u origin main


git add
git commit 
git push              // git hub pae push karna ka lia 


or git checkout dev          //dev branch mae jana ka lia 
then git push -u origin dev    // new dev  branch will add in github 



Open source contribution 

step 1 ;-  go to the particular opensource then folk it 

step 2:-  code mae click karka copy kar la na http wala ko

cd .. karna sa bhar ajaya ga then 

step 3 :- git clone <repo url>

ls     sa check karsakta haa kya kya haa file mae

git config --global --edit     for edit the information 

vim <File name >
vim README.md

this is my first contribution

bhar ana ka lia first esc button then wq

cat <file name>      isea ky ky change kiya haa check karsakta haa

cat README.md


master branch ka under change karsakta haa but do this by creating new branch 
and change 




git add README.md
git commit -m "redmi is updated"
git push 


after changing all the things 

we have to create the pull request 

contribute mae click karka then open pull request 







Comments

Popular posts from this blog

bubble short Q1

Java Program to Check Whether the String Consists of Special Characters