Как начать фиксацию через git в bitbucket - не вижу изменений

Возможно, я делаю это неправильно, но я следую учебникам по git как есть. У меня есть репозиторий на bitbucket под названием "testrepos", и я пытаюсь с ним работать.

Первое, Я клонирую его с помощью git clone https://my_username@bitbucket.org/my_username/testrepos.git

Теперь репозиторий пуст, поэтому я создал файл под названием main.cpp. Затем я выполнил команду "git add main.cpp". Если я выполню git status, то увижу, что есть новый файл main.cpp, который должен быть зафиксирован.

Наконец, я запускаю git commit -m 'First commit'. Есть 0 изменений, 0 вставок и 0 удалений! Почему мои файлы не фиксируются? Я использую push и pull, а также.

edit Вот полный лог:

Welcome to Git (version 1.7.7-preview20111014)

Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.

chris@EDI ~
$ cd git

chris@EDI ~/git
$ git clone https://my_username@bitbucket.org/my_username/testrepos.git
Cloning into testrepos...
Password:
warning: You appear to have cloned an empty repository.

chris@EDI ~/git
$ cd testrepos/

chris@EDI ~/git/testrepos (master)
$ git pull
Password:
Your configuration specifies to merge with the ref 'master'
from the remote, but no such ref was fetched.

chris@EDI ~/git/testrepos (master)
$ git add temp.cpp

chris@EDI ~/git/testrepos (master)
$ git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
#   (use "git rm --cached <file>..." to unstage)
#
#       new file:   temp.cpp
#

chris@EDI ~/git/testrepos (master)
$ git commit -m 'Committing temp file'
[master (root-commit) 5d659df] Committing temp file
 Committer: unknown <chris@EDI.(none)>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

    git config --global user.name "Your Name"
    git config --global user.email you@example.com

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 temp.cpp

chris@EDI ~/git/testrepos (master)
$ git pull
Password:
Your configuration specifies to merge with the ref 'master'
from the remote, but no such ref was fetched.

chris@EDI ~/git/testrepos (master)
$ git push
Password:
Everything up-to-date
11
задан cm2 8 December 2011 в 21:29
поделиться