Git — what am I doing wrong?

My first question here, I will try to describe in detail.
There is ubuntu server. Raised the heat.
Do test the daddy:
mkdir test
Create a thread file and initialize git:
cd test
git init
git add .
git commit-m "first commit"

First commit, and the repository is ready...

Config registers:
[receive]
denyCurrentBranch = ignore


Stomp on a remote computer, via ssh clone the master branch. Create, for example, file .gitignore, then commit, push get the message that everything has kaposias, but server changes are not in the file. When checking git status I get an answer:
git@serv:/var/js/test$ git status
On the master branch
The changes that will be included in the commit:
 (use "git reset HEAD <file>..." to remove from the index)
 deleted: .gitignore


Why is the file marked as "deleted" and why the changes are not applied automatically?
June 5th 19 at 21:51
1 answer
June 5th 19 at 21:53
git remote add origin {url repository}
did it?
No( And where you need it to do? On the server or local machine?

On the LAN gives:
\repo\test>git remote show
origin
- nikita.Stracke commented on June 5th 19 at 21:56
look, what's the first thing you need to do.

cd repository_folder
git init

then create a repository (https://github.com signup there, create an account, create a repository)
go to github to your repository and copy the url of the repository

further in the console
git remote add origin {url repository}
git status (to check what files are changed)
git add .
git commit-m "first commit"
git push -u origin master

on another machine the cloning :
git clone {url repository} {nazvanivaet} - alejandra commented on June 5th 19 at 21:59
I don't want to use github, because it is open, and the project is commercial( to Pay for a private account makes no sense - a private server.

In fact I did, but I don't understand why the changes are applied on the LAN, but when I do push to the server, they kind of go with the flow, but not saved. - nikita.Stracke commented on June 5th 19 at 22:02
well DK no repository that will not work, the complain then https://bitbucket.org
Think about it, where to go if they have nowhere to go , mm? - alejandra commented on June 5th 19 at 22:05
to fall or stuff up your own server and work will be paralyzed. - Lenny.Botsfo commented on June 5th 19 at 22:08
I have a physical server installed on it ubuntu server and git. The git init I create my own repository. I have a problem with the config. Changes arrive. What else I noticed.
Let's create a serv 2 branches: master and dev. Active leave the master branch, and LAN checkout dev-branch and change it. Then commit, push to the server - and the changes came normal. Ie, change does not come in the active branch. - nikita.Stracke commented on June 5th 19 at 22:11
thanks for your valuable comment, let's discuss it later and focus while on the subject) If You are certainly not difficult :) - nikita.Stracke commented on June 5th 19 at 22:14
, Bitbucket is also periodically covered with a copper basin...
To set up your own server with git, CI and other buns no problem. - Gretchen40 commented on June 5th 19 at 22:17
one thing to adjust, another to provide fault tolerance. - Lenny.Botsfo commented on June 5th 19 at 22:20
your point is what? Is that too lazy to do it, so you need to use the cloud?
https://status.bitbucket.org/history - here, too, can see far from perfect resiliency.
And when the cloud crashes, is not clear at all when there it'll get fixed, and when problems on your server, you can always check with a DevOps'when it's ready. - Gretchen40 commented on June 5th 19 at 22:23
the point in the comment to which you responded.

and when problems on your server, you can always check with a DevOps'when ready
The allegation has nothing, because:
1. Despite what problems
2. to clarify DevOps'a is not when everything is ready, and when he believes that everything will be ready

As you can see from the statistics bitbucket, availability of service is excellent, approximately 99.5% of the time the online service. - Lenny.Botsfo commented on June 5th 19 at 22:26
what were you doing to the equipment?) There are two server SAS the screw in RAID1 and leave this topic. - nikita.Stracke commented on June 5th 19 at 22:29
if you have not mastered your own dev server, it does not mean that it does not overpower the other. To the end whatever and whenever you want, an argument about anything. In light of recent events with ILV so all copper basin closer and closer.
I see no point in further communication, goodbye. - Gretchen40 commented on June 5th 19 at 22:32
Oh God, kindergarten. Started the discussion turned to the individual and merged. Note that I never claimed and is not agitated, it is not necessary to use your own server, and only wrote about the objective disadvantages of such a decision. You transferred a discussion on "too lazy to do it" and "not mastered their own dev-server".
All the best to you and walk in the fresh air often. - Lenny.Botsfo commented on June 5th 19 at 22:35
, merge... wiemy, it's just communication and not a street brawl. I just asked why you heat against the local dev server, because objectively it is more fault-tolerant than cloud services. I'm glad if you've never encountered locks or trivial to disable the Internet, after which all services except local are not working. If you regard this as a transition to the individual, I don't know, well then, use your own advice and walk in the fresh air, be easier chtoli.
Now just goodbye, fight online with someone else. - Gretchen40 commented on June 5th 19 at 22:38
,
ведь объективно он более отказоустойчив нежели облачные сервисы
Термин объективно тут не уместен.

Если вы это расцениваете как переход на личности
ad hominem

воюйте в интернете с кем-нибудь другим
Заметьте, написали мне вы и продолжаете писать, даже после того, как перестали видеть смысл в дальнейшем общении и попрощались. - Lenny.Botsfo commented on June 5th 19 at 22:41
, , guys, please calm down. Everyone has their own point of view, that's fine. Do not swear. I prefer to work with their server and I want to understand it. I understand that it is easier to use ready-made cloud, but I don't want easier, I want my. I came here for help and advice, and you then staged a farce, fight on the flat and fled, and I sat with nothing and sit) Can someone can help at least the right question to formulate for a search?) - nikita.Stracke commented on June 5th 19 at 22:44
you want to raise your server if you do not know what is git remote add origin ?? - alejandra commented on June 5th 19 at 22:47
during remote cloning this connection the machine is created, and when you try to set it again we get:
git remote add origin git@192.168.0.100:/var/js/test/.git
fatal: remote origin already exists.
- nikita.Stracke commented on June 5th 19 at 22:50

Find more questions by tags Git