기타

[Git] github 간단한 명령어 정리

 

//initialize empty git repository
$git init
$git config --global user.name "name"
$git config --global user.email "email"

//make .gitignore, not necessory
$vi .gitignore

//check status
$git status

//push code into repository
$git add --all .
$git commit -m "commit remark"

//remote: add remote repository named "origin"(can change) 
//you can manage remote repository named "origin"
$git remote add origin /*https://....*/

//if you want to remove remote repository named "origin"
$git remote remove origin

//push code from client to server
$git push origin master

//pull code from server to client
//if server code is updated
$git pull origin master

//clone repository to client(local)
//git clone: similar to git pull but use when there's nothing at client
$git clone /*https://...*/

//store password
$git config --global credential.helper 'store --file /*path*/'
728x90
반응형