Salt install and configure git

Lets first upload our salt repo to github

git init
git add .
git commit -m "first commit"
git remote add origin https://github.com/username/repo
got push -u origin master

Next i added git to the config


 git:
   pkg.installed
'git config --global user.name "Mona Lisa"':
  cmd.run

Heres the ouput of git log


commit c7898d83ffacc488f39e6b502673cc82b3af69a4 (HEAD -> master, origin/master)
Author: Your Name 
Date:   Thu Nov 15 08:51:45 2018 +0200

    hellO

commit 3af2c3db62fa207099cc2cd8676e8d3051f6c159
Author: Your Name 
Date:   Thu Nov 15 08:36:13 2018 +0200

    hellO

heres the output of git blame top.sls


^3af2c3d (Your Name 2018-11-15 08:36:13 +0200  1) base:
^3af2c3d (Your Name 2018-11-15 08:36:13 +0200  2)   'pc':
^3af2c3d (Your Name 2018-11-15 08:36:13 +0200  3)     - firewall
^3af2c3d (Your Name 2018-11-15 08:36:13 +0200  4)     - apache
^3af2c3d (Your Name 2018-11-15 08:36:13 +0200  5)     - ssh
^3af2c3d (Your Name 2018-11-15 08:36:13 +0200  6)     - git
^3af2c3d (Your Name 2018-11-15 08:36:13 +0200  7)   'manjaro':
^3af2c3d (Your Name 2018-11-15 08:36:13 +0200  8)     - firewall
^3af2c3d (Your Name 2018-11-15 08:36:13 +0200  9)     - nginx
^3af2c3d (Your Name 2018-11-15 08:36:13 +0200 10)     - git

I made a .gitignore
file with the following contents


*.sls

i ran git reset --hard
to remove this gitignore file

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.