F:\newtests\dbhee>git branch latestbranch
fatal: Not a valid object name: 'latest_branch'.
原因是没有提交一个对象,要先commit之后才会真正建立master分支,此时才可以建立其它分支。
F:\newtests\dbhee>git add .
F:\newtests\dbhee>git commit -m "message"
[latest_branch (root-commit) fc5b689] message
2076 files changed, 477798 insertions(+)
create mode 100644 .gitignore
create mode 100644 README.md
可以创建本地分支了:
git branch latestbranch