Posted on

Git Command ….

git init
git add <file>
git status
git commit
git push

using git bash
touch index.html
git init
git config –global user.name ‘frank kim’
git config –global user.email ‘fafad’
git config –list
git help config
git

git add index.html

git status
git rm –cache index.html
git add *.html
git .
git add -A
git reset

 

git commit
//remove comment, and make it like Initial Commit
git commit –m ‘Changed index.html’

git log

touch .gitignore add text log.txt
touch log.txt

git branch mybranch

to switch different brach.
git checkout mybranch
git checkout master

git push -u origin mybranch

git pull
git branch mybranch
git push origin master

//
git checkout mster
git pull origin master
git branch –merged
git merge mybranch
git push origin master
//

//
git branch –merged
git branch -d mybranch
git brach -a
git push origin –delete mybranch

create github repository.
git remote ***
git remote
git remote -v
git branch -a
git diff “Showing you changes”

git push -u origin master
git pull

Fast Example
git branch subtract
git checkout subtract
git status
git add -A
git commit -m ‘Subtract …’
git push -u origin subtract
git checkout master
git pull origin master
git merge subtract
git push origin master

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *