Заметка по GIT

1.В дире разработки смотрим статус, что было изменено

# git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
 
        modified:   navegacion_en_dispositivos.php
 
no changes added to commit (use "git add" and/or "git commit -a")

2.Коммитим с комментариями
# git commit -m 'added huawei3 in navegacion_en_dispositivos.php' -a
[master 1f00098] added huawei3 in navegacion_en_dispositivos.php
 1 file changed, 11 insertions(+), 1 deletion(-)
root@storage:/var/www/abc_dev/ipaddress# git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)
nothing to commit, working directory clean

3.Заливаем на гит, введя логин и пароль
# git push

4.Переходим в диру продакшн и загружаем изменения
# git pull
Username for 'https://gitlab.com':
....
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 4 (delta 3), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.
From <a href="https://gitlab.com/drag0mir/abc<br />
" title="https://gitlab.com/drag0mir/abc<br />
">https://gitlab.com/drag0mir/abc<br />
</a>   c2fbfb1..1f00098  master     -> origin/master
Updating c2fbfb1..1f00098
Fast-forward
 ipaddress/navegacion_en_dispositivos.php | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)