码迷,mamicode.com
首页 > 其他好文 > 详细

git总结

时间:2019-01-25 19:57:59      阅读:199      评论:0      收藏:0      [点我收藏+]

标签:cat   remote   origin   strong   git push   copy   git fetch   glob   nbsp   

git客户端配置

cd ~

git config --global user.name "<USERNAME>"

git config --global user.email "<EMAIL>"

ssh-keygen -t rsa -C "68297@sangfor.com" -b 4096

cat ~/.ssh/id_rsa.pub

 

git使用

git clone <URL> ./

 

git remote [-v]

git remote show origin

git branch [-a]

 

git checkout -b <BRANCH_NAME> origin/<BRANCH_NAME>

 

git branch <NEW_COPY_BRANCH_NAME>

git chekcout <NEW_COPY_BRANCH_NAME>

git push origin <NEW_COPY_BRANCH_NAME>

git branch -u origin/<NEW_COPY_BRANCH_NAME>

 

git branch -vvv

 

git branch -d <BRANCH_NAME>

git push origin -d <BRANCH_NAME>

 

git branch -a

git remote prune origin

 

git pull

git fetch origin

git merge <BRANCH_NAME>

git status

git add <FILE_NAMEs>

git commit -m "COMMIT_MESSAGE"

git log

git push

 

git reset --hard

 

 

git总结

标签:cat   remote   origin   strong   git push   copy   git fetch   glob   nbsp   

原文地址:https://www.cnblogs.com/RongjiJin/p/10321296.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!