E
E
Eugene2018-05-16 01:35:26
git
Eugene, 2018-05-16 01:35:26

Git - what am I doing wrong?

My first question here, I'll try to describe in detail.
There is ubuntu server. Raised git.
I make a test folder:
mkdir test
I create a thread file and initialize git:

cd test
git init
git add .
git commit -m "first commit"

The first commit and the repository is ready...
In the config I write:
[receive]
denyCurrentBranch = ignore

I stomp on a remote computer, I clone the master branch via ssh. I create, for example, a .gitignore file, then commit, push - I get a message that everything was successfully pushed, but there are no changes in the file on the server. When checking git status I get the following response:
[email protected]:/var/js/test$ git status
На ветке master
Изменения, которые будут включены в коммит:
  (используйте «git reset HEAD <файл>…», чтобы убрать из индекса)
        удалено:       .gitignore

Why is a file marked as "deleted" and why aren't changes applied automatically?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orfen, 2018-05-16
@Orfen

did git remote add origin {repo-url}
do this?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question