首页 > 其他 > 详细

常用git命令分享

时间:2015-02-25 15:38:51      阅读:212      评论:0      收藏:0      [点我收藏+]
create git space
	git init
set the local cofig
	git config --global user.name "xx"
	git config --global user.email "xx@hotmail.com"

set the remote url
	git remote add origin https://git.oschina.net/xx/aaa.git


download file:
	git fetch
create the local branch to link to the remote branch:
	git checkout -b master origin/master
 
add new file:
	git add fileName
	git commit ……
	git push……

modify the loacl file and reupload:
	git diff
	git commit -a -m"decription"
	git push origin master
download file :
	git fetch origin
	git merge origin/master

check the modified log
	git log -p

	
create a new branch:
	git branch testing
	
switch to branch:
	git checkout testing
	
create and switch to a new branch:
	git checkout -b testing

merge the branch:
	git checkout master
	git merge testing
	
delete a merged branch:
	git branch -d testing

list all the branches:
	git branch -v
	
list all the unmerged branches:
	git branch --no-merged



暂时先整理了如上,希望对大家有帮助!

常用git命令分享

原文:http://blog.csdn.net/howardge/article/details/43937327

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!