Important Git Commands
- git --version
- view git version
- git config --global --list
- view configuration
- git config --global user.name "username"
- user name configuration
- git config --global user.email "usermail"
- user email configuration
- git config --global alias.shortcmd "gitcommand"
- set alias for long git command
- git config --global -e
- edit git global configuration in text editor
- git init
- initialise to git local repository
- git add .
- add all files to git
- git commit -m "message"
- commit files to git
- git remote add origin
remote repository URL- add remote repository url
- git remote add origin
- git remote -v
- view remote repository
- git push origin master
- push local master branch repository to GitHub website
- git status
- view git status
- git log
- view git logs
- git log pretty=online
- view git logs
- git clone
clone repository URL- clone github repository local folder
- git clone
- git branch newBranchName
- create new branch
- git checkout newBranchName
- change to newbranch repository
- git push origin newBranchName
- push new branch in github
- git checkout master
- change to master branch repository
- git merge newBranchName
- merge newbranch in master branch
- git branch -v
- view all branches
- git branch -D newBranchName
- delete new branch in locally
- git push origin --delete newBranchName
- delete new branch in github website
- git diff --cached

super
ReplyDelete