1

This is driving me crazy and I can't find why it's doing this...

git clone git@github.com:/my/working/repo.git
--I don't do anything in the working copy--
git status
--no modification/no file to be commited--
git checkout another_branch
--I don't do anything in the working copy--
git status
modified: /some/file/that/I/touched.php
modified: /some/file/that/I/touched2.php
modified: /some/file/that/I/touched3.php

And when I do a git diff it shows only some line ending modifications. I see you coming... You're gonna tell me that I have to set autocrlf to false... Already tried that, and changes nothing...

If anyone has an idea on how to fix this i'd be more than pleased...

Thank you.

4

1 回答 1

1

你应该试试:

git clone git@github.com:/my/working/repo.git
git branch another_branch
git checkout another_branch
git pull origin another_branch

我希望它对你有用。

因为如果我们git checkout another_branch直接这样做,它将切换到远程分支,而不是在本地创建分支。

第二种方式是:

git checkout -b another_branch

于 2013-03-15T11:40:56.623 回答