git clone [项目地址]
git config --list : 查看信息
git remote -v 查看远程仓库地址
git config user.name [用户名] : 修改使用的用户名
git remote set-url origin 'http://...' : 设置远程仓库地址
git config --global credential.helper store : 输入用户名,密码并保存
git pull : 更新
若不成功,先 git add . 然后 git commit -m''
再次git pull , 这时会提示哪个文件有冲突 , 去处理冲突
然后再次 git add .
git commit -m''
git push
-------------------------------------------------------------
另一种解决办法: 见 http://www.cnblogs.com/dupd/p/6077929.html
--------------------------------------------------------------
从git往本地拉代码又不想commit :
git stash (保存状态)
git pull (拉)
git stash pop (从list中pop)
详见:
https://blog.csdn.net/wh_19910525/article/details/7784901
https://blog.csdn.net/u014536527/article/details/83069636
---------------------------------------------------------------------------------
git commit -m 和 git commit -a -m的区别:
前者需先 git add 将文件加入暂存区才可以执行,
后者等于是将已跟踪的文件加入暂存区并提交。
---------------------------------------------------------------------------------