github teminal /cmd commands

 

## Initiate git
- git init

## Check status
- git status

## Add file
> add specific file
- git add <file_name>
> add all files of a dir
- git add -A

## Commit changes
- git commit -m "Added new a new feature"

## Check commits list
> Clean View
- git reflog
> For details View
- git log --reflog

## Get back to a commit point
> Example git checkout 745e671
- git checkout <commit_id>
- git checkout <commit_id> /*
- git reset --hard HEAD
> Or get back with a new branch
- git checkout -b old-state 0d1d7fc32

## View Changes
- git diff

## Will add more note to
- login to github
- logout from github
> git remote add origin https://github.com/naimurhasan/folder-to-category-link-wp-pluign.git
- add origin
> git push -u origin master
- push code to github from git

- change origin
- idea of contribute
 
## bonus
git add .

git commit -m "Bug Fixed"

git push https://<username>:<password>@github.com/<username>/<repository>.git --all

 
 
git config credential.helper 'store'

Comments