克隆git库: git clone xxx@188.188.1.2:/work/projects/yyy cd yyy git fetch origin 查看远程分支: git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/master remotes/orig...

当git clone之后,直接git pull它会自动匹配一个正确的remote url 是因为在config文件中配置了以下内容:  [branch "master"]      remote = origin      merge = refs/heads/master  表明: 1.git处...

0

git 恢复单个文件

Posted in git at 九月 6th, 2011 / No Comments »

如果你只是要恢复一个文件(修复未提交文件中的错误),如”hello.rb”, 你就要使用 git checkout $ git checkout -- hello.rb http://www.gagahappy.com/git-checkout-file/