经常使用指令: html
Clone项目 git
git clone http://git.oschina.net/xxxxxx/xxxxxx.git github
#更新本地代码 vim
git pull bash
#Add app
git add . spa
#commit .net
git commit -am "" htm
#提交master分支 blog
git push origin master
#进入指定的本地目录
cd /d/apps/WorkSpaces/ADT/rexdemo
#避免每次都输入username and password:
http://www.cnblogs.com/ballwql/p/3462104.html
#使用方法一便可(亲测)
1.1 建立文件存储GIT用户名和密码, Ubuntu下也可用
在%HOME%目录中,通常为C:\users\Administrator,也能够是你本身建立的系统用户名目录,反正都在C:\users\中。文件名为.git-credentials,因为在Window中不容许直接建立以"."开头的文件,因此须要借助git bash进行,打开git bash客户端,进行%HOME%目录,而后用touch建立文件 .git-credentials, 用vim编辑此文件,输入内容格式:
touch .git-credentials
vim .git-credentials
https://{username}:{password}@github.com
1.2 添加Git Config 内容
进入git bash终端, 输入以下命令:
git config --global credential.helper store
上面操做完成后,尝试从Git上面Clone一份代码,这时还须要输入一次,Clone完成后,打开 .git-credentials,会发现多了行数据,就是用户名和数据,是使用明文保存的