指定git用户 (tell git who you are)
git config user.name "yourname@example.com"
初始化仓库并进行第一次的push
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/MemoryOfStars/commandLines.git #注意网址后要指明 .git
git push -u origin master
从不同的local repository向同一个remote repository推代码(因为history不同,所以需要进行强制merge)
git pull origin master --allow-unrelated-histories 执行之后
git push -u origin master push到远程仓库
管理已经绑定的远程仓库
检出仓库:$
git clone git://github.com/jquery/jquery.git
查看远程仓库:$
git remote -v
添加远程仓库:$
git remote add [name] [url]
删除远程仓库:$
git remote rm [name]