сервер debian:
Код: Выделить всё
aptitude install git-core
adduser git
su git
cat /tmp/id_rsa.my.pub >> ~/.ssh/authorized_keys
cd /home/user/domains/domain.com
git init
git add .
git commit -am "first commit"
git pushи тут получаю ответ:
Код: Выделить всё
fatal: 'origin': unable to chdir or not a git archive
fatal: The remote end hung up unexpectedlyтогда делаю:
Код: Выделить всё
git remote add origin git@domain.com:/home/user/domains/domain.com
Everything up-to-dateлокальный комп:
Код: Выделить всё
git clone git@domain.com:/home/user/domains/domain.com
cd domain.com
vi public_html/footer.php
git commit -am "change date"
git push origin masterсервер:
Код: Выделить всё
git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: public_html/footer.php
#
git pull
From git@domain.com:/home/user/domains/domain.com
* [new branch] master -> origin/master
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me either. Please
name which branch you want to merge on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details on the refspec.
If you often merge with the same branch, you may want to
configure the following variables in your configuration
file:
branch.master.remote = <nickname>
branch.master.merge = <remote-ref>
remote.<nickname>.url = <url>
remote.<nickname>.fetch = <refspec>
See git-config(1) for details.вот тут непонятно. он спрашивает с какой веткой склеивать. дальше как бы я ему не отвечал всё равно ничего не меняется:
Код: Выделить всё
git pull origin master
From git@domain.com:/home/user/domains/domain.com
* branch master -> FETCH_HEAD
Already up-to-date.
git pull origin master:master
Already up-to-date.
git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: public_html/footer.php
#Вопрос: что я делаю не так?