Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

1-> Open cmd and type command "git config --global user.

name = 'vishal086' " and


"git config --global user.email 'vishalkumar359877@gmail.com' " for setup username
and password

2-> your can see username and password by using command "git config --list" or "git
config --global user.name" and "git config --global user.email"

****************** Clone *******************


-> copy the files and folders from git in your working directory

1-> git clone "link of code from git hub"


now you can access the file and folder of github and you can change in file and can
add new file

2-> type ca command "git add." for add file in git hub
3-> type a command "git commit -m 'message'" for save the folder
4-> type a command "git push origit main" for push the folder on github

*************************** Init ******************


-> use to add the file in github repo
1-> create a folder (using command or mannualy)
2-> run command "git init" for initialize the git
3-> create files in your folder and make changes
4-> run command "git add . " for add the file in github
5-> run command "git commit -m 'Message' " for save the changes
6-> go to the github and create a new repo
7-> run a command "git remote add origin 'link of repo' "
8-> you can check or verify the remote by command "git remote -v "
9-> type a command to check the branch "git branch" and switch "git checkout
(secondBranch)"
10 -> type a command to "git branch -m (newName)"to change the branch name
11 -> type a command "git push origin main" to push the folder in github repo

12 -> type a command "git checkout -b feature1" to create new branch

13 -> type a command "git branch -d 'branchName' " to delete the branch

14-> type a command "git diff 'BranchName' to check the differences between two
branches

15-> type a command "git merge" to merge the branches

16-> staged changes "git reset"


17 -> undo git reset HEAD~1

You might also like