Skip to content

SumonPaul18/git-github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Git Command Using

Add global user/mail:

git config --global user.name "Sumon Paul"
git config --global user.mail "[email protected]"

Add local user/mail:

git config --local user.name "Your Name Here"
git config --local user.email "[email protected]"

Show config list:

git config --list

Check branch:

git branch

create a new repository on the command line:

git init

git add  --all / specefic file 	- add for Staging area

git commit -m "first commit"

git branch -M main

git remote add origin https://github.com/SumonPaul18/SumonPortfolio.git

git remote show origin

git push -u origin main

Create new branch:

git checkout -b [new branch name]

Switch branch:

git checkout [brunch-name]

Do for merge (master to others)

git merge <branch-name>

Show commit log

Show commit log shortly

git log			

Show commit log details

git log --patch		

Show only commit message

git log --oneline		

Git show 6bab78a

git show [commit code]	

Clone a Specific Git Branch Repository

git clone --single-branch --branch BranchName RepoUrl

git clone --single-branch --branch easylinux-v.1 https://github.com/SumonPaul18/easylinux.git